adapter: Do not remove client watch directly if discovery fails
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Mon, 8 Jun 2020 21:07:25 +0000 (14:07 -0700)
committerAyush Garg <ayush.garg@samsung.com>
Mon, 12 Apr 2021 09:00:49 +0000 (14:30 +0530)
Client watch is used for both discovery and it filters so in case the
client has set the later the watch shall be perserved.

Signed-off-by: Anuj Jain <anuj01.jain@samsung.com>
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
src/adapter.c

index 10c94a8558ef264a48a191746393a0de3a0db1e2..6d6d2d142a7d7e72284456b8640305d270fc88ac 100644 (file)
@@ -2211,7 +2211,6 @@ fail:
        if (client->msg) {
                reply = btd_error_busy(client->msg);
                g_dbus_send_message(dbus_conn, reply);
-               g_dbus_remove_watch(dbus_conn, client->watch);
                discovery_remove(client, false);
                return;
        }