projects
/
oweals
/
ubus.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
97ac89f
)
libubus: move uloop_init() call to ubus_connect_ctx
author
Felix Fietkau
<nbd@nbd.name>
Sun, 22 Jan 2017 13:28:47 +0000
(14:28 +0100)
committer
Felix Fietkau
<nbd@nbd.name>
Sun, 22 Jan 2017 13:28:49 +0000
(14:28 +0100)
uloop should not be used before it is initialized
Signed-off-by: Felix Fietkau <nbd@nbd.name>
libubus-req.c
patch
|
blob
|
history
libubus.c
patch
|
blob
|
history
diff --git
a/libubus-req.c
b/libubus-req.c
index 3eeae40297fc042fc2132acecb16d431a14c4253..5dcd470af661124169c86048639a08c256d862f1 100644
(file)
--- a/
libubus-req.c
+++ b/
libubus-req.c
@@
-145,7
+145,6
@@
int ubus_complete_request(struct ubus_context *ctx, struct ubus_request *req,
int64_t timeout = 0, time_end = 0;
if (!registered) {
- uloop_init();
ubus_add_uloop(ctx);
}
diff --git
a/libubus.c
b/libubus.c
index 51a148300d3781bcfad9df3418f4c8f5ea466cc7..9463522488c11782dc9c15c79f1932b37e1149c1 100644
(file)
--- a/
libubus.c
+++ b/
libubus.c
@@
-277,6
+277,7
@@
static void ubus_default_connection_lost(struct ubus_context *ctx)
int ubus_connect_ctx(struct ubus_context *ctx, const char *path)
{
+ uloop_init();
memset(ctx, 0, sizeof(*ctx));
ctx->sock.fd = -1;