Enhance debug message
[platform/core/connectivity/bluetooth-frwk.git] / bt-service / bt-service-adapter-le.c
index 064894f..7566c48 100644 (file)
@@ -270,10 +270,10 @@ int __bt_get_available_adv_slot_id(const char *sender, int adv_handle, gboolean
                        return i;
        }
 
-       if (le_feature_info.adv_inst_max <= 2)
-               i = 0;
-       else if (le_feature_info.adv_inst_max > 2 && use_reserved_slot == TRUE)
+       if (le_feature_info.adv_inst_max <= 1)
                i = 0;
+       else if (use_reserved_slot == TRUE)
+               i = 1;
        else
                i = 2;
 
@@ -415,6 +415,7 @@ int _bt_set_advertising(const char *sender, int adv_handle, gboolean enable, gbo
                                &error);
 
        if (error) {
+               BT_INFO("SetAdvertising %d, slot_id %d", enable, slot_id);
                BT_ERR("SetAdvertising Fail: %s", error->message);
                g_clear_error(&error);
                return BLUETOOTH_ERROR_INTERNAL;
@@ -1554,6 +1555,11 @@ int _bt_stop_le_scan(const char *sender)
        ret = g_dbus_proxy_call_sync(proxy, "StopLEDiscovery",
                                NULL, G_DBUS_CALL_FLAGS_NONE,
                                -1, NULL, &error);
+       if (error) {
+               BT_ERR("StopLEDiscovery Fail: %s", error->message);
+               g_clear_error(&error);
+       }
+
        if (ret == NULL) {
                BT_ERR("LE Scan stop failed");
                return BLUETOOTH_ERROR_INTERNAL;