ubus: fix handling of empty JSON-RPC batches
authorFelix Fietkau <nbd@openwrt.org>
Fri, 21 Jun 2013 09:25:29 +0000 (11:25 +0200)
committerFelix Fietkau <nbd@openwrt.org>
Fri, 21 Jun 2013 09:25:29 +0000 (11:25 +0200)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
ubus.c

diff --git a/ubus.c b/ubus.c
index d0354394660449a9ad1abf608ca6693fec9955c0..bc8c92cb9fdc16cbecaedf9a4a94a164793ba186 100644 (file)
--- a/ubus.c
+++ b/ubus.c
@@ -511,9 +511,7 @@ static void uh_ubus_data_done(struct client *cl)
                return uh_ubus_handle_request_object(cl, obj);
        case json_type_array:
                uh_ubus_init_batch(cl);
-               if (json_object_array_length(obj) > 0)
-                       return uh_ubus_next_batched_request(cl);
-               /* fall through */
+               return uh_ubus_next_batched_request(cl);
        default:
                return uh_ubus_single_error(cl, ERROR_PARSE);
        }