Fix TCT fail issue on ARTIK530 88/178788/1 accepted/tizen/unified/20180514.094233 submit/tizen/20180514.052241
authorDoHyun Pyun <dh79.pyun@samsung.com>
Mon, 14 May 2018 05:17:24 +0000 (14:17 +0900)
committerDoHyun Pyun <dh79.pyun@samsung.com>
Mon, 14 May 2018 05:17:24 +0000 (14:17 +0900)
If LE discoverying is not completed successly, we should remove
le_discovery_list explictly. Because stop_le_discovery_complete
function will be not called in this exception case.

Change-Id: I1fd812d451121b795105ced5a1723e3187e1d86e
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
src/adapter.c

index 7382247..ad53afa 100644 (file)
@@ -4285,6 +4285,9 @@ static DBusMessage *adapter_stop_le_discovery(DBusConnection *conn,
        DBG("cp.type %d", cp.type);
        DBG("adapter->discovery_enable %d", adapter->discovery_enable);
        if (adapter->discovery_enable == 0x00) {
+#ifdef TIZEN_FEATURE_BLUEZ_MODIFY
+               g_dbus_remove_watch(dbus_conn, client->watch);
+#endif
                adapter->le_discovering = false;
                g_dbus_emit_property_changed(dbus_conn, adapter->path,
                                        ADAPTER_INTERFACE, "LEDiscovering");