]> git.ipfire.org Git - thirdparty/squid.git/commit
Fix PeerConnector::handleNegotiationResult() error debugging (#1055)
authorAlex Rousskov <rousskov@measurement-factory.com>
Thu, 19 May 2022 19:34:05 +0000 (19:34 +0000)
committerSquid Anubis <squid-anubis@squid-cache.org>
Thu, 19 May 2022 20:31:15 +0000 (20:31 +0000)
commit70638a6a578339356acb15717ed0138a51f9bb24
treeecae54e0609e67b31db52c5e398b702a9255df4b
parent16d20c5dd341270bafadea9fdaab3cc0577ece29
Fix PeerConnector::handleNegotiationResult() error debugging (#1055)

    ERROR: failure while establishing TLS connection on FD: 70x123456*1

* FD value was malformed. Now report all Connection details instead.
* Error details were not reported (a pointer value was reported).

Also, for error message prefix, use a single/constant phrase instead of
error-dependent phrases. This principle is for level-0/1 messages, but
it is OK to apply it here as well, especially given the related TODO.

Also improved RawPointer reporting so that we can use it for this fix.
Some of these changes are not necessary (for the final code state), but
all of them except the last one were necessary at some point during the
work on this fix, and they all may become handy in the future:

* Print nothing if ptr is nil. Both existing callers benefit from this.
* Allow the caller to set the label/object delimiter. Also faster.
* Support reporting object values on a dedicated Debug::Extra line.
* Support (and do not attempt to print) nil RawPointer() labels.
src/base/IoManip.h
src/security/PeerConnector.cc