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 10c94a8..6d6d2d1 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;
        }