From: Alan T. DeKok Date: Thu, 24 Apr 2025 15:43:30 +0000 (-0400) Subject: let's print out error messages on error X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0588e1991b81cf3b4b6d3b6eead4db74eb032b89;p=thirdparty%2Ffreeradius-server.git let's print out error messages on error --- diff --git a/src/lib/server/tmpl_eval.c b/src/lib/server/tmpl_eval.c index 41867f4e96..48d680eec6 100644 --- a/src/lib/server/tmpl_eval.c +++ b/src/lib/server/tmpl_eval.c @@ -605,7 +605,10 @@ ssize_t _tmpl_to_atype(TALLOC_CTX *ctx, void *out, ret = fr_value_box_from_str(tmp_ctx, &tmp, src_type, NULL, result, (size_t)slen, NULL); - if (ret < 0) goto error; + if (ret < 0) { + RPEDEBUG("Failed parsing %.*s", (int) slen, result); + goto error; + } fr_value_box_bstrndup_shallow(&value, NULL, tmp.vb_strvalue, tmp.vb_length, tmp.tainted); to_cast = &value; @@ -635,7 +638,10 @@ ssize_t _tmpl_to_atype(TALLOC_CTX *ctx, void *out, ret = fr_value_box_from_str(tmp_ctx, &tmp, src_type, NULL, result, (size_t)slen, NULL); - if (ret < 0) goto error; + if (ret < 0) { + RPEDEBUG("Failed parsing %.*s", (int) slen, result); + goto error; + } fr_value_box_bstrndup_shallow(&value, NULL, tmp.vb_strvalue, tmp.vb_length, tmp.tainted); to_cast = &value; @@ -647,6 +653,7 @@ ssize_t _tmpl_to_atype(TALLOC_CTX *ctx, void *out, ret = tmpl_find_vp(&vp, request, vpt); if (ret < 0) { + RDEBUG("Failed finding attribute %s", vpt->name); talloc_free(tmp_ctx); return -2; }