From 6230ad29f21b9bf3d9ef037f62c1d2c62075145f Mon Sep 17 00:00:00 2001 From: Anurag Biradar Date: Wed, 19 Jul 2017 10:03:04 +0530 Subject: [PATCH] [bt-core] Fix FactoryTestMode method call bluetooth-testmode Application is not getting method reply for FactoryTestMode methode call bt-core was terminating itself before replying dbus method call Change-Id: Ife0aabda0e4ecc9040b30271f8397b9d2749a919 Measure: terminate bt-core after replying to dbus method call --- bt-core/bt-core-adapter.c | 2 -- bt-core/bt-core-dbus-handler.c | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/bt-core/bt-core-adapter.c b/bt-core/bt-core-adapter.c index 54264aa..9b45b72 100644 --- a/bt-core/bt-core-adapter.c +++ b/bt-core/bt-core-adapter.c @@ -692,7 +692,6 @@ gboolean _bt_core_factory_test_mode(const char *type, const char *arg) arg_list[0] = "bt-enable-rf-channel.sh"; arg_list[1] = (char *)arg; } else { - _bt_core_terminate(); return FALSE; } @@ -700,7 +699,6 @@ gboolean _bt_core_factory_test_mode(const char *type, const char *arg) if (__execute_command(cmd, arg_list) < 0) BT_ERR("running script failed"); - _bt_core_terminate(); return TRUE; } diff --git a/bt-core/bt-core-dbus-handler.c b/bt-core/bt-core-dbus-handler.c index 34c34c7..5eb2894 100755 --- a/bt-core/bt-core-dbus-handler.c +++ b/bt-core/bt-core-dbus-handler.c @@ -387,6 +387,7 @@ static void __bt_core_dbus_method(GDBusConnection *connection, ret = _bt_core_factory_test_mode(type, arg); g_dbus_method_invocation_return_value(invocation, g_variant_new("(i)", ret)); + _bt_core_terminate(); return; } else { ret = FALSE; -- 2.7.4