From: Abhishek Chandra Date: Tue, 18 Sep 2018 09:45:32 +0000 (+0530) Subject: Prevent Issue fixes X-Git-Tag: submit/tizen/20180919.001852~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cfa2c5a8050c31e8f79a1c27b7a8ec97f25ea736;p=platform%2Fcore%2Fapi%2Fbluetooth.git Prevent Issue fixes Prevent Issue fixes : - 1026365 - 1026068 - 109410 Change-Id: Iadeeeb303ee008387ecb5299c08854b53ab90d7a Signed-off-by: Abhishek Chandra --- diff --git a/src/bluetooth-adapter.c b/src/bluetooth-adapter.c index f53f221..5204eea 100644 --- a/src/bluetooth-adapter.c +++ b/src/bluetooth-adapter.c @@ -787,7 +787,7 @@ int bt_adapter_foreach_profile_connected_devices(const char *profile_uuid, ret = _bt_convert_address_to_string(&remote_address, remote_addr); if (ret != BT_ERROR_NONE) { BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(ret), ret); - return ret; + break; } if (!callback(remote_address, user_data)) { diff --git a/src/bluetooth-hrp.c b/src/bluetooth-hrp.c index 1f416d0..3df0e9d 100644 --- a/src/bluetooth-hrp.c +++ b/src/bluetooth-hrp.c @@ -1102,7 +1102,10 @@ int bt_hrp_collector_set_notification(bt_hrp_collector_h collector, bt_gatt_h svc = NULL; bt_gatt_h chr = NULL; bt_gatt_h desc = NULL; - char *buf = (char *)&isNotify; + char buf[1]; + + if (isNotify == true) buf[0] = '1'; + else buf[0] = '0'; if (_bt_hrp_collector_find(collector_s->remote_address) == NULL) return BT_ERROR_NOT_INITIALIZED; @@ -1125,7 +1128,7 @@ int bt_hrp_collector_set_notification(bt_hrp_collector_h collector, return error_code; } - bt_gatt_set_value(desc, buf, 2); + bt_gatt_set_value(desc, buf, 1); collector_s->char_update_cb = callback; diff --git a/test/bt_unit_test.c b/test/bt_unit_test.c index 6f126a1..0b6249a 100644 --- a/test/bt_unit_test.c +++ b/test/bt_unit_test.c @@ -2209,9 +2209,7 @@ void __bt_gatt_client_service_changed_cb(bt_gatt_client_h c, ret = bt_get_uuid_name(uuid, &svc); if (ret != BT_ERROR_NONE) - svc = g_strdup(uuid); - - TC_PRT("Remote deivce [%s] : %s is %s", addr, svc, + TC_PRT("Remote device [%s] : %s is %s", addr, svc, type == BT_GATT_CLIENT_SERVICE_ADDED ? "Added" : "Removed"); g_free(svc);