uloop: do not use ULOOP_EDGE_TRIGGER for the blocking socket, it can miss some events...
[project/ubus.git] / libubus.h
index 55c59e4..e0e418b 100644 (file)
--- a/libubus.h
+++ b/libubus.h
@@ -93,11 +93,13 @@ struct ubus_event_handler {
 struct ubus_context {
        struct list_head requests;
        struct avl_tree objects;
+       struct list_head pending;
 
        struct uloop_fd sock;
 
        uint32_t local_id;
        uint32_t request_seq;
+       int stack_depth;
 
        void (*connection_lost)(struct ubus_context *ctx);
 
@@ -148,7 +150,7 @@ 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);
+       uloop_fd_add(&ctx->sock, ULOOP_BLOCKING | ULOOP_READ);
 }
 
 /* call this for read events on ctx->sock.fd when not using uloop */