From 22e3e4685def73f30219daa97d939a426fbadc6c Mon Sep 17 00:00:00 2001 From: DoHyun Pyun Date: Wed, 5 Oct 2016 08:19:05 +0900 Subject: [PATCH] Fix the return value of the function providing connected status (TSAM-8605) Change-Id: I805af963a64364b478d30051a244bc7fa3bb8ce1 Signed-off-by: DoHyun Pyun --- bt-service/bt-service-device.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/bt-service/bt-service-device.c b/bt-service/bt-service-device.c index d98b29a..a5bfb0f 100644 --- a/bt-service/bt-service-device.c +++ b/bt-service/bt-service-device.c @@ -1729,16 +1729,17 @@ int _bt_is_device_connected(bluetooth_device_address_t *device_address, &error); if (result == NULL) { - int ret = BLUETOOTH_ERROR_INTERNAL; BT_ERR("[IsConnectedProfile] Error occured in Proxy call"); if (error) { BT_ERR("%s", error->message); if (g_strrstr(error->message, "Not Connected")) - ret = BLUETOOTH_ERROR_NOT_CONNECTED; + BT_DBG("Not connected"); g_error_free(error); } + *is_connected = FALSE; g_object_unref(device_proxy); - return ret; + g_free(uuid); + return BLUETOOTH_ERROR_NONE; } g_variant_get(result, "(b)", is_connected); g_free(uuid); -- 2.7.4