From: Alan T. DeKok Date: Wed, 16 Nov 2022 11:42:06 +0000 (-0500) Subject: temporary hack to set name2_quote X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=63e13b8be237cbce1b72fe329ea971a8ef6ba870;p=thirdparty%2Ffreeradius-server.git temporary hack to set name2_quote --- diff --git a/src/lib/server/cf_util.c b/src/lib/server/cf_util.c index 6934d0960ba..6dfc5323875 100644 --- a/src/lib/server/cf_util.c +++ b/src/lib/server/cf_util.c @@ -1165,6 +1165,18 @@ fr_token_t cf_section_name2_quote(CONF_SECTION const *cs) return cs->name2_quote; } +/** Set the quoting of the name2 identifier + * + * @param[in] cs containing name2. + * @param[in] token the quote token + */ +void cf_section_add_name2_quote(CONF_SECTION *cs, fr_token_t token) +{ + if (!cs) return; + + cs->name2_quote = token; +} + /** Return the quoting for one of the variadic arguments * * @param[in] cs containing the arguments. diff --git a/src/lib/server/cf_util.h b/src/lib/server/cf_util.h index 38ddcc03030..6bfb77a6864 100644 --- a/src/lib/server/cf_util.h +++ b/src/lib/server/cf_util.h @@ -173,6 +173,9 @@ char const *cf_section_argv(CONF_SECTION const *cs, int argc); fr_token_t cf_section_name2_quote(CONF_SECTION const *cs); fr_token_t cf_section_argv_quote(CONF_SECTION const *cs, int argc); +// only for rewrite_update +void cf_section_add_name2_quote(CONF_SECTION *cs, fr_token_t token); + #define cf_section_free_children(_x) cf_item_free_children(cf_section_to_item(_x))