From: injun.yang Date: Mon, 2 Jul 2018 08:42:16 +0000 (+0900) Subject: Fix : GATT service is not registered X-Git-Tag: submit/tizen/20180710.070923~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F08%2F183108%2F1;p=platform%2Fcore%2Fapi%2Fbluetooth.git Fix : GATT service is not registered Change-Id: I86c0304fb62c48337d8c062a9d2b010d08597d2f Signed-off-by: injun.yang --- diff --git a/src/bluetooth-gatt.c b/src/bluetooth-gatt.c index a698f47..d7da44d 100644 --- a/src/bluetooth-gatt.c +++ b/src/bluetooth-gatt.c @@ -2935,6 +2935,15 @@ int bt_gatt_server_register_service(bt_gatt_server_h server, bt_gatt_h service) _bt_convert_error_to_string(ret), ret); goto fail; } + + ret = _bt_get_error_code(bluetooth_gatt_set_descriptor_value(desc->path, + desc->value, desc->value_length)); + + if (ret != BT_ERROR_NONE) { + BT_ERR("%s(0x%08x)", + _bt_convert_error_to_string(ret), ret); + goto fail; + } } } @@ -2952,6 +2961,7 @@ int bt_gatt_server_register_service(bt_gatt_server_h server, bt_gatt_h service) fail: BT_ERR("Registering Service failed!!!!!"); + bluetooth_gatt_unregister_service(svc->path); return ret; }