diff mbox series

[BlueZ] gatt: Fix not sending any data when server supports AcquireWrite

Message ID 20200406211903.12549-1-luiz.dentz@gmail.com (mailing list archive)
State Accepted
Headers show
Series [BlueZ] gatt: Fix not sending any data when server supports AcquireWrite | expand

Commit Message

Luiz Augusto von Dentz April 6, 2020, 9:19 p.m. UTC
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

msg.msg_iovlen should be set to 1 to forward the data received over the
file descriptor.
---
 src/gatt-database.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Szymon Janc April 7, 2020, 7:14 a.m. UTC | #1
Hi Luiz,

On Monday, 6 April 2020 23:19:03 CEST Luiz Augusto von Dentz wrote:
> From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
> 
> msg.msg_iovlen should be set to 1 to forward the data received over the
> file descriptor.
> ---
>  src/gatt-database.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/src/gatt-database.c b/src/gatt-database.c
> index 483c84341..db67dd3f8 100644
> --- a/src/gatt-database.c
> +++ b/src/gatt-database.c
> @@ -2396,6 +2396,7 @@ static int sock_io_send(struct io *io, const void
> *data, size_t len)
> 
>  	memset(&msg, 0, sizeof(msg));
>  	msg.msg_iov = &iov;
> +	msg.msg_iovlen = 1;
> 
>  	return sendmsg(io_get_fd(io), &msg, MSG_NOSIGNAL);
>  }

Applied, thanks.
diff mbox series

Patch

diff --git a/src/gatt-database.c b/src/gatt-database.c
index 483c84341..db67dd3f8 100644
--- a/src/gatt-database.c
+++ b/src/gatt-database.c
@@ -2396,6 +2396,7 @@  static int sock_io_send(struct io *io, const void *data, size_t len)
 
 	memset(&msg, 0, sizeof(msg));
 	msg.msg_iov = &iov;
+	msg.msg_iovlen = 1;
 
 	return sendmsg(io_get_fd(io), &msg, MSG_NOSIGNAL);
 }