diff options
author | Felix Fietkau <nbd@nbd.name> | 2017-01-22 14:28:47 +0100 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2017-01-22 14:28:49 +0100 |
commit | cd82f9758dd6da37fb11f2992ceb66d3ee99bac0 (patch) | |
tree | 58cf1c77eeb727419bb7472fbab58fc173ff45db | |
parent | 97ac89f9727d4fae1b2d63d2fc3b59e0d5d4bf65 (diff) | |
download | ubus-cd82f9758dd6da37fb11f2992ceb66d3ee99bac0.tar.gz |
libubus: move uloop_init() call to ubus_connect_ctx
uloop should not be used before it is initialized
Signed-off-by: Felix Fietkau <nbd@nbd.name>
-rw-r--r-- | libubus-req.c | 1 | ||||
-rw-r--r-- | libubus.c | 1 |
2 files changed, 1 insertions, 1 deletions
diff --git a/libubus-req.c b/libubus-req.c index 3eeae40..5dcd470 100644 --- 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); } @@ -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; |