From a70ad3e32dc75dcc07f6e4e9bf7addf99405ee58 Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Fri, 12 Jul 2013 12:50:45 +0300 Subject: [PATCH] input: Fix service disconnected state transition Without this patch the input service would remain in connected state whenever a remotely initiated disconnection happens. --- profiles/input/device.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/profiles/input/device.c b/profiles/input/device.c index 57667cc0e..a8d596402 100644 --- a/profiles/input/device.c +++ b/profiles/input/device.c @@ -159,6 +159,8 @@ static gboolean intr_watch_cb(GIOChannel *chan, GIOCondition cond, gpointer data if (idev->ctrl_io && !(cond & G_IO_NVAL)) g_io_channel_shutdown(idev->ctrl_io, TRUE, NULL); + btd_service_disconnecting_complete(idev->service, 0); + /* Enter the auto-reconnect mode if needed */ input_device_enter_reconnect_mode(idev); @@ -754,8 +756,6 @@ int input_device_disconnect(struct btd_service *service) if (err < 0) return err; - btd_service_disconnecting_complete(service, 0); - return 0; } -- 2.47.3