Fix the bug for dbus connection and proxy deinitialization 57/102457/1 accepted/tizen/3.0/common/20161207.194308 accepted/tizen/3.0/ivi/20161207.011042 accepted/tizen/3.0/mobile/20161207.010939 accepted/tizen/3.0/tv/20161207.010958 accepted/tizen/3.0/wearable/20161207.011016 submit/tizen_3.0/20161206.041315
authorDoHyun Pyun <dh79.pyun@samsung.com>
Tue, 6 Dec 2016 02:01:28 +0000 (11:01 +0900)
committerDoHyun Pyun <dh79.pyun@samsung.com>
Tue, 6 Dec 2016 02:02:25 +0000 (11:02 +0900)
Change-Id: Id81a3924fb85697bf2056a6c1403f9e3ff9275ca
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
bt-api/bt-common.c
bt-api/include/bt-request-sender.h
bt-service/bt-service-adapter-le.c
bt-service/bt-service-event-receiver.c

index 1fc5bcf..d7a9e49 100644 (file)
@@ -1784,10 +1784,13 @@ BT_EXPORT_API int bluetooth_unregister_callback(void)
 
        _bt_set_user_data(BT_COMMON, NULL, NULL);
 
+       _bt_gdbus_deinit_proxys();
+
        if (system_gconn) {
                g_object_unref(system_gconn);
                system_gconn = NULL;
        }
+
        return BLUETOOTH_ERROR_NONE;
 }
 
index df9c7d8..bf110e5 100644 (file)
@@ -69,6 +69,9 @@ int _bt_async_send_request(int service_type, int service_function,
        } \
        )
 
+void _bt_gdbus_deinit_proxys(void);
+
+
 #ifdef __cplusplus
 }
 #endif
index b27d208..2afe345 100644 (file)
@@ -140,7 +140,7 @@ void _bt_clear_gatt_client_senders(void)
                gatt_client_senders = NULL;
        }
 }
-#if 0
+
 static void __bt_send_foreach_event(gpointer data, gpointer user_data)
 {
        char *sender = data;
@@ -149,15 +149,11 @@ static void __bt_send_foreach_event(gpointer data, gpointer user_data)
        _bt_send_event_to_dest(sender, BT_DEVICE_EVENT, BLUETOOTH_EVENT_GATT_CHAR_VAL_CHANGED,
                                        param);
 }
-#endif
+
 void _bt_send_char_value_changed_event(void *param)
 {
-#if 0
        g_slist_foreach(gatt_client_senders, __bt_send_foreach_event,
                                        (gpointer)param);
-#else
-       _bt_send_event(BT_DEVICE_EVENT, BLUETOOTH_EVENT_GATT_CHAR_VAL_CHANGED, param);
-#endif
 }
 
 void __bt_free_le_adv_slot(void)
index ced268a..374585d 100644 (file)
@@ -534,15 +534,11 @@ void _bt_handle_adapter_event(GVariant *msg, const char *member)
                param = g_variant_new("(ii)", result,
                                        adv_handle);
 
-#if 0
                const char *sender;
                sender = _bt_get_adv_slot_owner(slot_id);
                _bt_send_event_to_dest(sender, BT_ADAPTER_EVENT,
                                event,
                                param);
-#else
-               _bt_send_event(BT_ADAPTER_EVENT, event, param);
-#endif
 
                if (event == BLUETOOTH_EVENT_ADVERTISING_STOPPED)
                        _bt_unregister_adv_slot_owner(slot_id);