Revert BT enable / disable calling method to async call 65/219165/3
authorDoHyun Pyun <dh79.pyun@samsung.com>
Mon, 2 Dec 2019 23:58:08 +0000 (08:58 +0900)
committerDoHyun Pyun <dh79.pyun@samsung.com>
Tue, 3 Dec 2019 01:43:04 +0000 (10:43 +0900)
Change-Id: Ic02325a4ab5755c2be4bfac5beffdf85b0cfcd0e
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
bt-service-adaptation/services/adapter/bt-service-core-adapter.c
bt-service-adaptation/services/bt-request-handler.c

index b072256..ff8e48e 100644 (file)
@@ -1240,8 +1240,6 @@ static void __bt_adapter_update_bt_enabled(void)
        /* TODO:Add timer function to handle any further post processing */
        g_idle_add((GSourceFunc)__bt_adapter_post_set_enabled, NULL);
 
-       /*Return BT_ADAPTER_ENABLE Method invocation context */
-       __bt_adapter_handle_pending_requests(BT_ENABLE_ADAPTER, NULL, 0);
        /*Send BT Enabled event to application */
        _bt_send_event(BT_ADAPTER_EVENT, BLUETOOTH_EVENT_ENABLED,
                        g_variant_new("(i)", result));
@@ -1272,9 +1270,6 @@ static void __bt_adapter_update_bt_disabled(void)
        /* TODO:Add timer function to handle any further post processing */
        g_idle_add((GSourceFunc)__bt_adapter_post_set_disabled, NULL);
 
-       /* Return BT_ADAPTER_DISABLE Method invocation context */
-       __bt_adapter_handle_pending_requests(BT_DISABLE_ADAPTER, NULL, 0);
-
        /* Send BT Disabled event to application */
        _bt_send_event(BT_ADAPTER_EVENT, BLUETOOTH_EVENT_DISABLED,
                        g_variant_new("(i)", result));
index a13ad56..87f79bb 100644 (file)
@@ -193,9 +193,7 @@ static void __bt_service_get_parameters(GVariant *in_param,
 static gboolean __bt_is_sync_function(int service_function)
 {
        /*TODO: Keep adding sync methods with expect replies from bluetooth service */
-       if (service_function == BT_ENABLE_ADAPTER
-                       || service_function == BT_DISABLE_ADAPTER
-                       || service_function == BT_GET_LOCAL_ADDRESS
+       if (service_function == BT_GET_LOCAL_ADDRESS
                        || service_function == BT_GET_LOCAL_NAME
                        || service_function == BT_GET_LOCAL_VERSION
                        || service_function == BT_GET_BONDED_DEVICES
@@ -441,24 +439,10 @@ int __bt_bluez_request(int function_name,
        switch (function_name) {
        case BT_ENABLE_ADAPTER: {
                result = _bt_enable_adapter();
-               /* Save invocation */
-               if (result == BLUETOOTH_ERROR_NONE) {
-                       BT_DBG("_bt_enable_adapter scheduled successfully! save invocation context");
-                       sender = (char*)g_dbus_method_invocation_get_sender(context);
-                       _bt_save_invocation_context(context, result, sender,
-                                       function_name, NULL);
-               }
                break;
        }
        case BT_DISABLE_ADAPTER: {
                result = _bt_disable_adapter();
-               /* Save invocation */
-               if (result == BLUETOOTH_ERROR_NONE) {
-                       BT_DBG("_bt_disable_adapter scheduled successfully! save invocation context");
-                       sender = (char*)g_dbus_method_invocation_get_sender(context);
-                       _bt_save_invocation_context(context, result, sender,
-                                       function_name, NULL);
-               }
                break;
        }
        case BT_RECOVER_ADAPTER: