json_script: allow non-string types in command arguments
authorFelix Fietkau <nbd@openwrt.org>
Sun, 8 Nov 2015 19:19:08 +0000 (20:19 +0100)
committerFelix Fietkau <nbd@openwrt.org>
Sun, 8 Nov 2015 19:19:08 +0000 (20:19 +0100)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
json_script.c

index 22d8417..7cef481 100644 (file)
@@ -484,8 +484,8 @@ static int cmd_process_strings(struct json_call *call, struct blob_attr *attr)
                        continue;
 
                if (blobmsg_type(cur) != BLOBMSG_TYPE_STRING) {
                        continue;
 
                if (blobmsg_type(cur) != BLOBMSG_TYPE_STRING) {
-                       ctx->handle_error(ctx, "Invalid argument in command", attr);
-                       return -1;
+                       blobmsg_add_blob(&ctx->buf, cur);
+                       continue;
                }
 
                ret = cmd_add_string(call, blobmsg_data(cur));
                }
 
                ret = cmd_add_string(call, blobmsg_data(cur));