X-Git-Url: http://git.openwrt.org/?p=project%2Fubus.git;a=blobdiff_plain;f=libubus.c;h=9463522488c11782dc9c15c79f1932b37e1149c1;hp=b25d8b084f9b6271bfd1625c24549c25edfb2a78;hb=24ffe9b582b492054aebb59ac7a175fd65eef5d8;hpb=df088f03c02aebba304a371486f09e95ed34bf5f diff --git a/libubus.c b/libubus.c index b25d8b0..9463522 100644 --- 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; @@ -362,6 +363,7 @@ void ubus_shutdown(struct ubus_context *ctx) if (!ctx) return; close(ctx->sock.fd); + uloop_timeout_cancel(&ctx->pending_timer); free(ctx->msgbuf.data); }