From: Arran Cudbard-Bell Date: Wed, 23 Oct 2024 06:08:43 +0000 (-0600) Subject: fr_dict_attr_by_name_substr sets its own errors X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b6ac75aaaa4b3464d617bcc0bbe07b8cfde34f87;p=thirdparty%2Ffreeradius-server.git fr_dict_attr_by_name_substr sets its own errors --- diff --git a/src/lib/util/dict_util.c b/src/lib/util/dict_util.c index 5b7a2c816bb..958e3adbee4 100644 --- a/src/lib/util/dict_util.c +++ b/src/lib/util/dict_util.c @@ -2038,7 +2038,7 @@ fr_slen_t fr_dict_oid_component(fr_dict_attr_err_t *err, child = dict_attr_child_by_num(parent, num); if (!child) { - fr_strerror_printf("Failed resolving child %u in context %s", + fr_strerror_printf("Failed resolving child %u in namespace '%s'", num, parent->name); if (err) *err = FR_DICT_ATTR_NOTFOUND; FR_SBUFF_ERROR_RETURN(&our_in); @@ -2053,11 +2053,8 @@ fr_slen_t fr_dict_oid_component(fr_dict_attr_err_t *err, { fr_dict_attr_err_t our_err; oid_str: + /* Sets its own errors, don't override */ if (fr_dict_attr_by_name_substr(&our_err, &child, parent, &our_in, tt) < 0) { - fr_strerror_printf("Failed resolving \"%.*s\" in context %s", - (int)fr_sbuff_remaining(&our_in), - fr_sbuff_current(&our_in), - parent->name); if (err) *err = our_err; FR_SBUFF_ERROR_RETURN(&our_in); }