diff options
author | Felix Fietkau <nbd@openwrt.org> | 2012-12-15 00:37:09 +0100 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2012-12-15 00:37:09 +0100 |
commit | f3fabd45a7f6e33a3dcdb5c1f6b8439fc1d105f5 (patch) | |
tree | 177ff36ca93cb37769627619e4ac9aa7e75c7fe9 /libubus.c | |
parent | c2158ae53c5d53874c98e04ac4075ffa76a133fc (diff) | |
download | ubus-f3fabd45a7f6e33a3dcdb5c1f6b8439fc1d105f5.tar.gz |
libubus: implement notify handling
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Diffstat (limited to 'libubus.c')
-rw-r--r-- | libubus.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -108,9 +108,10 @@ ubus_process_msg(struct ubus_context *ctx, struct ubus_msghdr *hdr) void __hidden ubus_process_pending_msg(struct ubus_context *ctx) { - struct ubus_pending_msg *pending, *tmp; + struct ubus_pending_msg *pending; - list_for_each_entry_safe(pending, tmp, &ctx->pending, list) { + while (!list_empty(&ctx->pending)) { + pending = list_first_entry(&ctx->pending, struct ubus_pending_msg, list); list_del(&pending->list); ubus_process_msg(ctx, &pending->hdr); free(pending); |