From 659a98c8107d194f3ef6822dacc97e02e7c53e31 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Mon, 31 Jan 2011 20:00:39 +0100 Subject: add an inline function to add the ubus socket to uloop --- libubus.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'libubus.h') diff --git a/libubus.h b/libubus.h index 5db2992..c93ad8f 100644 --- a/libubus.h +++ b/libubus.h @@ -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 */ -- cgit v1.2.1