Repository : ssh://git@open-mesh.org/alfred
On branch : master
commit c25b93f1df789925c2bbd26c4d6766e732fdb60e Author: Sven Eckelmann sven@open-mesh.com Date: Fri Jan 18 16:06:20 2013 +0100
alfred: Fix the size of the push_data length over unix sockets
The size information of the push_data.header.length sent over unix sockets was different compared to the one sent over UDP.
Signed-off-by: Sven Eckelmann sven@open-mesh.com Signed-off-by: Simon Wunderlich siwu@hrz.tu-chemnitz.de
c25b93f1df789925c2bbd26c4d6766e732fdb60e unix_sock.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/unix_sock.c b/unix_sock.c index 93f84d4..b29f635 100644 --- a/unix_sock.c +++ b/unix_sock.c @@ -180,10 +180,11 @@ static int unix_sock_req_data_reply(struct globals *globals, int client_sock, memcpy(data->data, dataset->buf, dataset->data.header.length);
len = dataset->data.header.length + sizeof(*data); + len += sizeof(*push) - sizeof(push->header); push->header.length = htons(len); push->tx.seqno = htons(seqno++);
- write(client_sock, buf, sizeof(*push) + len); + write(client_sock, buf, sizeof(push->header) + len); }
close(client_sock);