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:
6eb3c96
)
libubus: reset ctx->sock.error when doing ubus reconnect
author
Hans Dedecker
<dedeckeh@gmail.com>
Sat, 18 Feb 2017 12:41:52 +0000
(13:41 +0100)
committer
Felix Fietkau
<nbd@nbd.name>
Mon, 20 Feb 2017 10:31:56 +0000
(11:31 +0100)
When ubus connect fails ctx->sock.eof will be set but ctx->sock.error
can be set as well. Reset ctx->sock.error as well when doing ubus
reconnect
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
libubus-io.c
patch
|
blob
|
history
diff --git
a/libubus-io.c
b/libubus-io.c
index 7047ac5ea76a0f4c5fae5a6455ddba551fafdf22..daa710677880c1d5933b45ab9b528116c5f320ca 100644
(file)
--- a/
libubus-io.c
+++ b/
libubus-io.c
@@
-375,6
+375,7
@@
int ubus_reconnect(struct ubus_context *ctx, const char *path)
}
ctx->sock.eof = false;
+ ctx->sock.error = false;
ctx->sock.fd = usock(USOCK_UNIX, path, NULL);
if (ctx->sock.fd < 0)
return UBUS_STATUS_CONNECTION_FAILED;