From d5710cb4e1ea104915023781da841973cdf37de3 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Fri, 21 Jun 2013 11:25:29 +0200 Subject: [PATCH] ubus: fix handling of empty JSON-RPC batches Signed-off-by: Felix Fietkau --- ubus.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ubus.c b/ubus.c index d035439..bc8c92c 100644 --- 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); } -- 2.25.1