From: Nick Porter Date: Wed, 14 Feb 2024 13:56:45 +0000 (+0000) Subject: This is (usually) creating the attributes, not finding them X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4f6dda3164276788846fb7a0bb2198ca940786a0;p=thirdparty%2Ffreeradius-server.git This is (usually) creating the attributes, not finding them And if it fails, that is module failure rather than noop --- diff --git a/src/modules/rlm_sqlcounter/rlm_sqlcounter.c b/src/modules/rlm_sqlcounter/rlm_sqlcounter.c index 0962da7bc6f..7225b06f1a7 100644 --- a/src/modules/rlm_sqlcounter/rlm_sqlcounter.c +++ b/src/modules/rlm_sqlcounter/rlm_sqlcounter.c @@ -281,15 +281,18 @@ static unlang_action_t CC_HINT(nonnull) mod_authorize(rlm_rcode_t *p_result, mod RETURN_MODULE_NOOP; } + /* + * Populate start and end attributes for use in query expansion + */ if (tmpl_find_or_add_vp(&vp, request, inst->start_attr) < 0) { - RWDEBUG2("Couldn't find %s, doing nothing...", inst->start_attr->name); - RETURN_MODULE_NOOP; + REDEBUG("Couldn't create %s", inst->start_attr->name); + RETURN_MODULE_FAIL; } vp->vp_uint64 = fr_time_to_sec(inst->last_reset); if (tmpl_find_or_add_vp(&vp, request, inst->end_attr) < 0) { - RWDEBUG2("Couldn't find %s, doing nothing...", inst->end_attr->name); - RETURN_MODULE_NOOP; + REDEBUG2("Couldn't create %s", inst->end_attr->name); + RETURN_MODULE_FAIL; } vp->vp_uint64 = fr_time_to_sec(inst->reset_time);