projects
/
project
/
ubus.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bbd3fbc
)
libubus: fix deferring invoke processing for non-uloop usage
author
Felix Fietkau
<
[email protected]
>
Tue, 24 Jun 2014 20:42:14 +0000
(22:42 +0200)
committer
Felix Fietkau
<
[email protected]
>
Wed, 25 Jun 2014 08:24:27 +0000
(10:24 +0200)
Signed-off-by: Felix Fietkau <
[email protected]
>
libubus-req.c
patch
|
blob
|
history
libubus.c
patch
|
blob
|
history
diff --git
a/libubus-req.c
b/libubus-req.c
index 7378a92405fe3d757536195351ecf2a22d519b6d..f24f033d9d65da38ebbd5dac53f2cce4a16b4df3 100644
(file)
--- a/
libubus-req.c
+++ b/
libubus-req.c
@@
-171,9
+171,13
@@
int ubus_complete_request(struct ubus_context *ctx, struct ubus_request *req,
if (req->complete_cb)
req->complete_cb(req, status);
- if (!registered)
+ if (!registered)
{
uloop_fd_delete(&ctx->sock);
+ if (ctx->stack_depth)
+ ctx->pending_timer.cb(&ctx->pending_timer);
+ }
+
return status;
}
diff --git
a/libubus.c
b/libubus.c
index e852519c0c3d8faa1d711a26631518492b85f61e..1a550c126265aaa72ce4ba623d00dfb370773e29 100644
(file)
--- a/
libubus.c
+++ b/
libubus.c
@@
-81,7
+81,8
@@
ubus_queue_msg(struct ubus_context *ctx, struct ubus_msghdr *hdr)
memcpy(&pending->hdr, hdr, sizeof(*hdr) + blob_raw_len(ubus_msghdr_data(hdr)));
list_add(&pending->list, &ctx->pending);
- uloop_timeout_set(&ctx->pending_timer, 1);
+ if (ctx->sock.registered)
+ uloop_timeout_set(&ctx->pending_timer, 1);
}
void __hidden