diff options
author | Felix Fietkau <nbd@openwrt.org> | 2011-02-07 20:43:43 +0100 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2011-02-07 20:43:43 +0100 |
commit | ef978a8ea002a146d8a6d60a9f0458b272f912eb (patch) | |
tree | a242bb3d7c8035bcadf76f152d877f0223a87d21 /libubus.h | |
parent | 17cdc0f4f6b79629309d43af40867b39744844c4 (diff) | |
download | ubus-ef978a8ea002a146d8a6d60a9f0458b272f912eb.tar.gz |
libubus: add an inline function for socket event handling
Diffstat (limited to 'libubus.h')
-rw-r--r-- | libubus.h | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -145,6 +145,12 @@ static inline void ubus_add_uloop(struct ubus_context *ctx) uloop_fd_add(&ctx->sock, ULOOP_EDGE_TRIGGER | ULOOP_BLOCKING | ULOOP_READ); } +/* call this for read events on ctx->sock.fd when not using uloop */ +static inline void ubus_handle_event(struct ubus_context *ctx) +{ + ctx->sock.cb(&ctx->sock, ULOOP_READ); +} + /* ----------- raw request handling ----------- */ /* wait for a request to complete and return its status */ |