]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Fix acl annotate_transaction reporting in mgr:config (#1574)
authorFrancesco Chemolli <5175948+kinkie@users.noreply.github.com>
Wed, 8 Nov 2023 14:17:17 +0000 (14:17 +0000)
committerSquid Anubis <squid-anubis@squid-cache.org>
Wed, 8 Nov 2023 20:59:42 +0000 (20:59 +0000)
Possibly broken since commit 4eac340 that stopped printing `-m=` because
it customized/specialized too much of the TypedOption::print() code.

src/acl/CharacterSetOption.h
src/acl/Options.h

index ad69897bb5c5c5163450ea7739795b7aba5bd413..5d3aaa9a98fb38dd461d4c4271677fa751c06bc5 100644 (file)
@@ -29,9 +29,8 @@ TypedOption<CharacterSetOptionValue>::import(const SBuf &rawValue) const
 }
 
 template <>
-inline
-void
-TypedOption<CharacterSetOptionValue>::print(std::ostream &os) const
+inline void
+TypedOption<CharacterSetOptionValue>::printValue(std::ostream &os) const
 {
     recipient_->value.printChars(os); // TODO: Quote if needed.
 }
index e19a6036e33461a230015209617a57a9ecff9b45..a6139be6368db64060f6cfe17c65a8a56ec28350 100644 (file)
@@ -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.