static int handle_expr_not(struct json_call *call, struct blob_attr *expr)
{
struct blob_attr *tb[3];
+ int ret;
json_get_tuple(expr, tb, BLOBMSG_TYPE_ARRAY, 0);
if (!tb[1])
return -1;
- return json_process_expr(call, tb[1]);
+ ret = json_process_expr(call, tb[1]);
+ if (ret < 0)
+ return ret;
+ return !ret;
}
static const struct json_handler expr[] = {
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));
}
blobmsg_for_each_attr(cur, block, rem) {
+ if (ctx->abort)
+ break;
+
switch(blobmsg_type(cur)) {
case BLOBMSG_TYPE_STRING:
if (!i)
if (!call.seq)
call.seq = ++_seq;
+ ctx->abort = false;
+
__json_script_run(&call, file, NULL);
}