X-Git-Url: http://git.archive.openwrt.org/?p=project%2Flibubox.git;a=blobdiff_plain;f=json_script.c;h=87b1d71b1837168e7a6aa55163b41084c79e7455;hp=463aac88dee42cef14e848f878a0548c96c0134d;hb=eebe3fcd2a5728264faa5ae72bbc38d7bb704c8e;hpb=1f019ceea1ed39286e6bccfb3ff936c22fe0f7c0 diff --git a/json_script.c b/json_script.c index 463aac8..87b1d71 100644 --- a/json_script.c +++ b/json_script.c @@ -415,8 +415,10 @@ static int json_process_expr(struct json_call *call, struct blob_attr *cur) } ret = __json_process_type(call, cur, expr, ARRAY_SIZE(expr), &found); - if (!found) - ctx->handle_error(ctx, "Unknown expression type", cur); + if (!found) { + const char *name = blobmsg_data(blobmsg_data(cur)); + ctx->handle_expr(ctx, name, cur, call->vars); + } return ret; } @@ -671,6 +673,7 @@ static int __default_handle_expr(struct json_script_ctx *ctx, const char *name, struct blob_attr *expr, struct blob_attr *vars) { + ctx->handle_error(ctx, "Unknown expression type", expr); return -1; }