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>
This commit is contained in:
parent
97ac89f972
commit
cd82f9758d
2 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue