diff --git a/dundee/bluetooth.c b/dundee/bluetooth.c index e2e2bcab..9ddc72c9 100644 --- a/dundee/bluetooth.c +++ b/dundee/bluetooth.c @@ -28,6 +28,7 @@ #include #include #include +#include #include @@ -44,6 +45,8 @@ struct bluetooth_device { char *address; char *name; + int fd; + DBusPendingCall *call; }; @@ -54,6 +57,8 @@ static void bt_disconnect(struct dundee_device *device, DBG("%p", bt); + shutdown(bt->fd, SHUT_RDWR); + CALLBACK_WITH_SUCCESS(cb, data); } @@ -93,6 +98,8 @@ static void bt_connect_reply(DBusPendingCall *call, gpointer user_data) goto done; } + bt->fd = fd; + CALLBACK_WITH_SUCCESS(cb, fd, cbd->data); done: