From: Alan T. DeKok Date: Wed, 8 Jun 2022 13:26:12 +0000 (-0400) Subject: walk function arguments first. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7e85231056e143eacdb7c1053b44448069b1c824;p=thirdparty%2Ffreeradius-server.git walk function arguments first. because the instantiation function can move the arguments into it's private data structure --- diff --git a/src/lib/unlang/xlat_eval.c b/src/lib/unlang/xlat_eval.c index 36477d1c642..e3ef3aa347e 100644 --- a/src/lib/unlang/xlat_eval.c +++ b/src/lib/unlang/xlat_eval.c @@ -1818,18 +1818,15 @@ int xlat_eval_walk(xlat_exp_head_t *head, xlat_walker_t walker, xlat_type_t type break; case XLAT_FUNC_UNRESOLVED: - if (!type || (type & XLAT_FUNC_UNRESOLVED)) { - ret = walker(node, uctx); + if (xlat_exp_head(node->call.args)) { + ret = xlat_eval_walk(node->call.args, walker, type, uctx); if (ret < 0) return ret; - if (ret > 0) return 0; } - /* - * Now evaluate the function's arguments - */ - if (xlat_exp_head(node->call.args)) { - ret = xlat_eval_walk(node->call.args, walker, type, uctx); + if (!type || (type & XLAT_FUNC_UNRESOLVED)) { + ret = walker(node, uctx); if (ret < 0) return ret; + if (ret > 0) return 0; } break;