This wires in custom expression handler functionality, which was present in json script since the original version, but never used.
Signed-off-by: Denis Osvald <[email protected]> --- json_script.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/json_script.c b/json_script.c index 463aac8..8894901 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; } -- 2.12.0 _______________________________________________ openwrt-devel mailing list [email protected] https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
