projects
/
oweals
/
ubus.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
17cdc0f
)
libubus: add an inline function for socket event handling
author
Felix Fietkau
<nbd@openwrt.org>
Mon, 7 Feb 2011 19:43:43 +0000
(20:43 +0100)
committer
Felix Fietkau
<nbd@openwrt.org>
Mon, 7 Feb 2011 19:43:43 +0000
(20:43 +0100)
libubus.h
patch
|
blob
|
history
diff --git
a/libubus.h
b/libubus.h
index cdcc579b5799f70c97b94ec06e2175e5dd08852a..9e78ad43ebaf03efa52b5bbcaa86de981578d644 100644
(file)
--- a/
libubus.h
+++ b/
libubus.h
@@
-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 */