From: Francesco Chemolli <5175948+kinkie@users.noreply.github.com> Date: Wed, 8 Nov 2023 14:17:17 +0000 (+0000) Subject: Fix acl annotate_transaction reporting in mgr:config (#1574) X-Git-Tag: SQUID_7_0_1~292 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3da549718d8060ba7d747cf60d83435cc6c422e2;p=thirdparty%2Fsquid.git Fix acl annotate_transaction reporting in mgr:config (#1574) Possibly broken since commit 4eac340 that stopped printing `-m=` because it customized/specialized too much of the TypedOption::print() code. --- diff --git a/src/acl/CharacterSetOption.h b/src/acl/CharacterSetOption.h index ad69897bb5..5d3aaa9a98 100644 --- a/src/acl/CharacterSetOption.h +++ b/src/acl/CharacterSetOption.h @@ -29,9 +29,8 @@ TypedOption::import(const SBuf &rawValue) const } template <> -inline -void -TypedOption::print(std::ostream &os) const +inline void +TypedOption::printValue(std::ostream &os) const { recipient_->value.printChars(os); // TODO: Quote if needed. } diff --git a/src/acl/Options.h b/src/acl/Options.h index e19a6036e3..a6139be636 100644 --- a/src/acl/Options.h +++ b/src/acl/Options.h @@ -182,14 +182,17 @@ public: { if (configured()) { os << ' ' << (disabled() ? offName : onName); - if (valued()) - os << '=' << recipient_->value; + if (valued()) { + os << '='; + printValue(os); + } } // else do not report the implicit default } private: void import(const SBuf &rawValue) const { recipient_->value = rawValue; } + void printValue(std::ostream &os) const { os << recipient_->value; } // The "mutable" specifier demarcates set-once Option kind/behavior from the // ever-changing recipient of the actual admin-configured option value.