From: DoHyun Pyun Date: Wed, 11 Mar 2020 03:11:30 +0000 (+0900) Subject: Fix the advertisement fail issue X-Git-Tag: accepted/tizen/5.5/unified/20200312.234620^0 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fconnectivity%2Fbluetooth-frwk.git;a=commitdiff_plain;h=593b79876bfe833f9468521f047933f5efe87746 Fix the advertisement fail issue The comparision value for initial adv handle was wrong, this patchset corrects the comparision value for adv handle. Change-Id: I76abbec8972cdd6de2c8217620c0c95756a5b844 Signed-off-by: DoHyun Pyun --- diff --git a/bt-service-adaptation/services/gatt/bt-service-gatt.c b/bt-service-adaptation/services/gatt/bt-service-gatt.c index ed7122d..62283e1 100644 --- a/bt-service-adaptation/services/gatt/bt-service-gatt.c +++ b/bt-service-adaptation/services/gatt/bt-service-gatt.c @@ -332,7 +332,7 @@ void _bt_check_adv_app_termination(const char *name) __bt_remove_all_service_handles(app); /* If Advertising is enabled, stop it */ - if (app->adv_handle > 0) { + if (app->adv_handle != 0) { BT_INFO("Stop advertising on instance ID [%d]", app->instance_id); /* Disable adv if running */ BT_INFO("Disable Advertising Adv Handle [%d] sender [%s]", @@ -578,7 +578,7 @@ char * _bt_get_sender_and_handle(int server_instance, int *adv_handle) for (k = 1; k < MAX_APPS_SUPPORTED; k++) { info = &numapps[k]; - if (info->instance_id == server_instance && info->adv_handle != -1) { + if (info->instance_id == server_instance && info->adv_handle != 0) { *adv_handle = info->adv_handle; BT_DBG("Server instance [%d] Adv handle [%d] Sender [%s]", server_instance, *adv_handle, info->sender); return g_strdup(info->sender);