Enhance debug message 14/183114/1 submit/tizen/20180710.070923
authorinjun.yang <injun.yang@samsung.com>
Mon, 2 Jul 2018 09:05:31 +0000 (18:05 +0900)
committerinjun.yang <injun.yang@samsung.com>
Mon, 2 Jul 2018 09:05:31 +0000 (18:05 +0900)
Change-Id: Idf5e38b6d51b9c9c296e4081465ef3127a7c7822
Signed-off-by: injun.yang <injun.yang@samsung.com>
src/bluetooth-gatt.c

index d7da44d5ecd3f54a3dc10e630a67c43a40ec010b..074158ce067d51e5e991dd31615746c2c1d70ddf 100644 (file)
@@ -143,7 +143,6 @@ static int __get_gatt_handle_by_uuid(GSList *list, const char *uuid,
        char *uuid128_a;
        char *uuid128_b;
 
-       BT_INFO("UUID [%s]", uuid);
        uuid128_a = _bt_convert_uuid_to_uuid128(uuid);
        if (uuid128_a == NULL) {
                BT_ERR("Wrong type of uuid : %s", uuid);
@@ -172,10 +171,17 @@ static int __get_gatt_handle_by_uuid(GSList *list, const char *uuid,
                bt_get_uuid_name(uuid, &name);
                BT_INFO("Find uuid : %s [%s]", uuid, name);
                g_free(name);
+               for (l = list; l; l = g_slist_next(l)) {
+                       bt_gatt_common_s *common = (bt_gatt_common_s *)l->data;
+                       bt_get_uuid_name(common->uuid, &name);
+                       BT_INFO("%s %s [%s]", common->path + 38, common->uuid, name);
+                       g_free(name);
+               }
                return BT_ERROR_NO_DATA;
        }
 
        *gatt_handle = l->data;
+
        return BT_ERROR_NONE;
 }
 
@@ -4245,6 +4251,9 @@ int bt_gatt_client_set_characteristic_value_changed_cb(bt_gatt_h characteristic,
        bt_gatt_handle_property_t chr_handle;
        bt_gatt_service_s *service_s;
        bt_gatt_client_s  *client_s;
+#else
+       char *name = NULL;
+       bt_gatt_service_s *svc = (bt_gatt_service_s *)chr->parent;
 #endif
 
        BT_INFO("+");
@@ -4284,10 +4293,10 @@ int bt_gatt_client_set_characteristic_value_changed_cb(bt_gatt_h characteristic,
                                        client_s->client_id,
                                        TRUE));
 #else
+               bt_get_uuid_name(svc->uuid, &name);
                ret = _bt_get_error_code(bluetooth_gatt_watch_characteristics(
-                                       chr->path));
-
-
+                                       chr->path, name));
+               g_free(name);
 #endif
                if (ret != BT_ERROR_NONE)
                        BT_ERR("%s(0x%08x)",