state->success = p_success;
state->ctx = ctx;
+ if (node) switch (node->type) {
+ case XLAT_GROUP:
+ case XLAT_BOX:
+ break;
+
+ case XLAT_TMPL:
+ if (tmpl_is_data(node->vpt)) break;
+ FALL_THROUGH;
+
+ default:
+ RDEBUG("| %s", node->fmt);
+ break;
+ }
+ RINDENT();
+
/*
* Initialise the input and output lists
*/
fr_dlist_talloc_free(&state->out);
if (unlang_xlat_push(state->ctx, state->success, &state->out, request, child, false) < 0) {
*p_result = RLM_MODULE_FAIL;
+ REXDENT();
return UNLANG_ACTION_STOP_PROCESSING;
}
return UNLANG_ACTION_PUSHED_CHILD;
case XLAT_ACTION_DONE:
if (state->success) *state->success = true;
*p_result = RLM_MODULE_OK;
+ REXDENT();
return UNLANG_ACTION_CALCULATE_RESULT;
case XLAT_ACTION_FAIL:
fail:
if (state->success) *state->success = false;
*p_result = RLM_MODULE_FAIL;
+ REXDENT();
return UNLANG_ACTION_CALCULATE_RESULT;
default:
case XLAT_ACTION_DONE:
if (state->success) *state->success = true;
*p_result = RLM_MODULE_OK;
+ REXDENT();
return UNLANG_ACTION_CALCULATE_RESULT;
case XLAT_ACTION_FAIL:
fail:
if (state->success) *state->success = false;
*p_result = RLM_MODULE_FAIL;
+ REXDENT();
return UNLANG_ACTION_CALCULATE_RESULT;
default:
case XLAT_ACTION_DONE:
if (state->success) *state->success = true;
*p_result = RLM_MODULE_OK;
+ REXDENT();
return UNLANG_ACTION_CALCULATE_RESULT;
case XLAT_ACTION_PUSH_UNLANG:
case XLAT_ACTION_FAIL:
if (state->success) *state->success = false;
*p_result = RLM_MODULE_FAIL;
+ REXDENT();
return UNLANG_ACTION_CALCULATE_RESULT;
/* DON'T SET DEFAULT */
}
fr_assert(0); /* Garbage xlat action */
*p_result = RLM_MODULE_FAIL;
+ REXDENT();
return UNLANG_ACTION_CALCULATE_RESULT;
}
xa = resume(ctx, out, XLAT_CTX(exp->call.inst->data, t->data, t->mctx, rctx), request, result);
VALUE_BOX_TALLOC_LIST_VERIFY(result);
+ REXDENT();
RDEBUG2("| %%%c%s:...%c",
(exp->call.func->input_type == XLAT_INPUT_ARGS) ? '(' : '{',
exp->call.func->name,
case XLAT_ACTION_FAIL:
break;
}
+ RINDENT();
return xa;
}
request, result);
VALUE_BOX_TALLOC_LIST_VERIFY(result);
- if (RDEBUG_ENABLED2) xlat_debug_log_expansion(request, *in, &result_copy, __LINE__);
- fr_dlist_talloc_free(&result_copy);
+ if (RDEBUG_ENABLED2) {
+ REXDENT();
+ xlat_debug_log_expansion(request, *in, &result_copy, __LINE__);
+ RINDENT();
+ fr_dlist_talloc_free(&result_copy);
+ }
switch (xa) {
case XLAT_ACTION_FAIL:
case XLAT_ACTION_DONE: /* Process the result */
fr_dcursor_next(out);
+ REXDENT();
xlat_debug_log_result(request, *in, fr_dcursor_current(out));
+ RINDENT();
break;
}
}