__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]",
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);