From: Anuj Jain Date: Mon, 4 Apr 2022 12:46:59 +0000 (+0530) Subject: LE CoC: Fix disconnection on multiple writes X-Git-Tag: accepted/tizen/6.5/unified/20231010.011948~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7b848c37d481c58557339fc2b7126e2993b21daf;p=platform%2Fcore%2Fapi%2Fbluetooth.git LE CoC: Fix disconnection on multiple writes This patch fixes the the issue of LE_L2CAP socket disconnection when write operation is performed more than once by either client or server. To avoid build conflict please merge this patch after merging framework patch: (Change-Id: Icf4d8a51acc444765a9b61224a3a5d3fd26bfa65) Change-Id: I6bd2e7fdbfe8ba1931d4a141266da8c902deb228 Signed-off-by: Anuj Jain --- diff --git a/tests/test/bt_unit_test.c b/tests/test/bt_unit_test.c index 49caf93..db0276b 100644 --- a/tests/test/bt_unit_test.c +++ b/tests/test/bt_unit_test.c @@ -6268,12 +6268,12 @@ int test_input_callback(void *data) if (g_test_param.param_count > 0) { ret = bt_socket_send_data_l2cap_channel(l2cap_le_client_fd, g_test_param.params[0], - strlen(g_test_param.params[0]) + 1); + strlen(g_test_param.params[0])); __bt_free_test_param(&g_test_param); } else { ret = bt_socket_send_data_l2cap_channel(l2cap_le_client_fd, - data, sizeof(data)); + data, strlen(data)); } TC_PRT("returns %d %s\n", ret, __bt_get_error_message(ret));