X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fubus.git;a=blobdiff_plain;f=libubus.h;h=c93ad8f8a7541575681b6d92197f948accf99f9f;hp=698e356513c3ac5e406ac0539e28d82ba328f5b5;hb=659a98c8107d194f3ef6822dacc97e02e7c53e31;hpb=768d282ae9334351635679ba0dce073e5d9d8e1b diff --git a/libubus.h b/libubus.h index 698e356..c93ad8f 100644 --- a/libubus.h +++ b/libubus.h @@ -125,13 +125,17 @@ struct ubus_request { void *priv; }; -#define BLOBMSG_END_TABLE BLOBMSG_TYPE_UNSPEC struct ubus_context *ubus_connect(const char *path); void ubus_free(struct ubus_context *ctx); const char *ubus_strerror(int error); +static inline void ubus_add_uloop(struct ubus_context *ctx) +{ + uloop_fd_add(&ctx->sock, ULOOP_EDGE_TRIGGER | ULOOP_BLOCKING | ULOOP_READ); +} + /* ----------- raw request handling ----------- */ /* wait for a request to complete and return its status */