From: Alan T. DeKok Date: Tue, 28 Mar 2023 07:36:46 +0000 (+0900) Subject: clean up error messages for consistency X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b17cb1fcb282a15280c1313718f7222f652708d7;p=thirdparty%2Ffreeradius-server.git clean up error messages for consistency --- diff --git a/src/lib/server/tmpl.h b/src/lib/server/tmpl.h index 5874ab9f91..3fe9269f8c 100644 --- a/src/lib/server/tmpl.h +++ b/src/lib/server/tmpl.h @@ -1012,7 +1012,6 @@ typedef enum { TMPL_ATTR_ERROR_NONE = 0, //!< No error. TMPL_ATTR_ERROR_EMPTY, //!< Attribute ref contains no data. TMPL_ATTR_ERROR_BAD_PREFIX, //!< Missing '&' or has '&' when it shouldn't. - TMPL_ATTR_ERROR_INVALID_LIST_QUALIFIER, //!< List qualifier is invalid. TMPL_ATTR_ERROR_LIST_NOT_ALLOWED, //!< List qualifier is not allowed here. TMPL_ATTR_ERROR_LIST_MISSING, //!< List qualifier is required, but missing. TMPL_ATTR_ERROR_UNKNOWN_NOT_ALLOWED, //!< Attribute specified as OID, could not be diff --git a/src/lib/server/tmpl_tokenize.c b/src/lib/server/tmpl_tokenize.c index da003563dd..ef471905bc 100644 --- a/src/lib/server/tmpl_tokenize.c +++ b/src/lib/server/tmpl_tokenize.c @@ -596,8 +596,8 @@ static fr_slen_t tmpl_request_ref_list_from_substr(TALLOC_CTX *ctx, tmpl_attr_er if (depth == 0) { if (at_rules->namespace || (at_rules->list_presence == TMPL_ATTR_LIST_FORBID)) { - fr_strerror_const("It is not permitted to specify a request reference here"); - if (err) *err = TMPL_ATTR_ERROR_INVALID_LIST_QUALIFIER; + fr_strerror_const("List qualifiers are not allowed here"); + if (err) *err = TMPL_ATTR_ERROR_LIST_NOT_ALLOWED; fr_sbuff_set(&our_in, in); /* Marker at the start */ error: