X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fubus.git;a=blobdiff_plain;f=libubus.h;h=c93ad8f8a7541575681b6d92197f948accf99f9f;hp=49a147a931c3b270fc88a0ce5d252ccd2cdae18a;hb=659a98c8107d194f3ef6822dacc97e02e7c53e31;hpb=36b1a80b075203c650a6612f1ef45674210fb7a6 diff --git a/libubus.h b/libubus.h index 49a147a..c93ad8f 100644 --- a/libubus.h +++ b/libubus.h @@ -125,16 +125,16 @@ 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); -/* ----------- helpers for message handling ----------- */ - -struct blob_attr **ubus_parse_msg(struct blob_attr *msg); +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 ----------- */