Fix the received-bytes merged issue 10/252510/1 accepted/tizen/unified/20210201.130258 submit/tizen/20210201.015438
authorWootak Jung <wootak.jung@samsung.com>
Fri, 29 Jan 2021 05:06:11 +0000 (14:06 +0900)
committerWootak Jung <wootak.jung@samsung.com>
Fri, 29 Jan 2021 05:17:04 +0000 (14:17 +0900)
When multiple write-data come on fd in continuously, the data merged.

- reproduction sequnce
1. makes gatt connection
2. writes on characteristic continuously in client side
3. received-data merged on write_value_requested_cb

Change-Id: Ieed5e2a115220d9ebfa48eae03fbf45ebb4402d5
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
bt-api/bt-gatt-service.c

index 3ba4217..aaeb320 100644 (file)
@@ -3135,7 +3135,7 @@ void  bluetooth_gatt_server_send_acquire_write_response(GVariant * parameters)
        BT_DBG("GATT Server Acquire Write Offset:    [%d]", offset);
 
 
-       if (socketpair(AF_UNIX, SOCK_STREAM, 0, pipefd) < 0) {
+       if (socketpair(AF_UNIX, SOCK_SEQPACKET, 0, pipefd) < 0) {
                        strerror_r(errno, err_msg, sizeof(err_msg));
                        BT_ERR("socketpair(): %s", err_msg);
                        return ;