From: injun.yang Date: Mon, 2 Jul 2018 09:05:31 +0000 (+0900) Subject: Enhance debug message X-Git-Tag: submit/tizen/20180710.070923^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d69f0ede8050ef98623e23697848e0653a133ecc;p=platform%2Fcore%2Fapi%2Fbluetooth.git Enhance debug message Change-Id: Idf5e38b6d51b9c9c296e4081465ef3127a7c7822 Signed-off-by: injun.yang --- diff --git a/src/bluetooth-gatt.c b/src/bluetooth-gatt.c index d7da44d..074158c 100644 --- a/src/bluetooth-gatt.c +++ b/src/bluetooth-gatt.c @@ -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)",