When writing data to the IPC socket, we noticed if only a partial write was done, on subsequent iteration, the call to `write` would be given the wrong number of bytes to write.
This issue has previously been reported here:
https://groups.google.com/g/swupdate/c/T_ZvZJH1rqE
Signed-off-by: Patrick Bergeron <
pber...@biointelligence.com>
---
ipc/network_ipc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ipc/network_ipc.c b/ipc/network_ipc.c
index e2fff782..099587d4 100644
--- a/ipc/network_ipc.c
+++ b/ipc/network_ipc.c
@@ -315,7 +315,7 @@ int ipc_send_data(int connfd, char *buf, int size)
ssize_t len = size;
while (len) {
- ret = write(connfd, buf, (size_t)size);
+ ret = write(connfd, buf, (size_t)len);
if (ret < 0)
return ret;
len -= ret;
--
2.34.1