From: Wootak Jung Date: Wed, 9 Feb 2022 06:11:46 +0000 (+0900) Subject: Fix gatt send response logic X-Git-Tag: accepted/tizen/unified/20220210.105859^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F96%2F270796%2F1;p=platform%2Fcore%2Fapi%2Fbluetooth.git Fix gatt send response logic no need to send response if response_need false Change-Id: I23f524212fa0dab76b73a17299f3bc85bb75ac5b --- diff --git a/tests/test/bt_unit_test.c b/tests/test/bt_unit_test.c index 2516fb4..f74ccc2 100644 --- a/tests/test/bt_unit_test.c +++ b/tests/test/bt_unit_test.c @@ -2911,9 +2911,10 @@ void __bt_gatt_server_write_value_requested_cb(const char *remote_address, for (i = 0; i < len; i++) printf("%d ", value[i]); - bt_gatt_server_send_response(request_id, - BLUETOOTH_GATT_ATT_REQUEST_TYPE_WRITE, offset, - resp_status, NULL, 0); + if (response_needed) + bt_gatt_server_send_response(request_id, + BLUETOOTH_GATT_ATT_REQUEST_TYPE_WRITE, offset, + resp_status, NULL, 0); printf("\n"); }