projects
/
project
/
ubus.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
83461b9
)
libubus: fix error handling during close after partially receiving a message
author
Felix Fietkau
<nbd@openwrt.org>
Wed, 9 Dec 2015 17:26:43 +0000
(18:26 +0100)
committer
Felix Fietkau
<nbd@openwrt.org>
Wed, 9 Dec 2015 17:26:43 +0000
(18:26 +0100)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
libubus-io.c
patch
|
blob
|
history
diff --git
a/libubus-io.c
b/libubus-io.c
index e6d42367b4a4ce41ca78a79cdf443ceab64c489c..b9b312807fa08182667f40b76e204ad8829007b7 100644
(file)
--- a/
libubus-io.c
+++ b/
libubus-io.c
@@
-293,7
+293,8
@@
static bool get_next_msg(struct ubus_context *ctx, int *recv_fd)
iov.iov_base = (char *)ctx->msgbuf.data + sizeof(hdrbuf.data);
iov.iov_len = blob_len(ctx->msgbuf.data);
- if (iov.iov_len > 0 && !recv_retry(ctx->sock.fd, &iov, true, NULL))
+ if (iov.iov_len > 0 &&
+ recv_retry(ctx->sock.fd, &iov, true, NULL) <= 0)
return false;
return true;