adapter: Fix passing wrong pointer to stop discovery
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Thu, 11 Jun 2020 17:26:57 +0000 (10:26 -0700)
committerAyush Garg <ayush.garg@samsung.com>
Mon, 12 Apr 2021 09:00:49 +0000 (14:30 +0530)
stop_discovery_complete now expects adapter to be passed instead of
client.

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

index f14fd45..27172a9 100644 (file)
@@ -3076,7 +3076,11 @@ static int discovery_stop(struct watch_client *client, bool exit)
 #endif
        mgmt_send(adapter->mgmt, MGMT_OP_STOP_DISCOVERY,
                        adapter->dev_id, sizeof(cp), &cp,
+#ifdef TIZEN_FEATURE_BLUEZ_MODIFY
                        stop_discovery_complete, client, NULL);
+#else
+                       stop_discovery_complete, adapter, NULL);
+#endif
 
        return -EINPROGRESS;
 }