diff options
author | Felix Fietkau <nbd@openwrt.org> | 2011-01-31 20:00:39 +0100 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2011-01-31 20:00:39 +0100 |
commit | 659a98c8107d194f3ef6822dacc97e02e7c53e31 (patch) | |
tree | 9a5c8fc39d78f6aa68087beac3f4d8583a9b108a /libubus.h | |
parent | 4f8b3c8d46ef18b5a53e8da3c4e4cda7f603deb7 (diff) | |
download | ubus-659a98c8107d194f3ef6822dacc97e02e7c53e31.tar.gz |
add an inline function to add the ubus socket to uloop
Diffstat (limited to 'libubus.h')
-rw-r--r-- | libubus.h | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -131,6 +131,11 @@ 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 */ |