From 71dd3e09c3f8fc9fef896066cb14bb0f6004ca7f Mon Sep 17 00:00:00 2001 From: Wootak Jung Date: Fri, 29 Jan 2021 14:06:11 +0900 Subject: [PATCH] Fix the received-bytes merged issue 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 --- bt-api/bt-gatt-service.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bt-api/bt-gatt-service.c b/bt-api/bt-gatt-service.c index 3ba4217..aaeb320 100644 --- a/bt-api/bt-gatt-service.c +++ b/bt-api/bt-gatt-service.c @@ -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 ; -- 2.7.4