X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fubus.git;a=blobdiff_plain;f=libubus.c;h=9463522488c11782dc9c15c79f1932b37e1149c1;hp=8163ff7004fb6e23487a7661f9c55b8cc9a55783;hb=cd82f9758dd6da37fb11f2992ceb66d3ee99bac0;hpb=3b8d4b5653ef47bd2032d377cecfee40b613eb72 diff --git a/libubus.c b/libubus.c index 8163ff7..9463522 100644 --- a/libubus.c +++ b/libubus.c @@ -103,7 +103,7 @@ ubus_process_msg(struct ubus_context *ctx, struct ubus_msghdr_buf *buf, int fd) break; } - ubus_process_obj_msg(ctx, buf); + ubus_process_obj_msg(ctx, buf, fd); break; case UBUS_MSG_MONITOR: if (ctx->monitor_cb) @@ -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); }