BUG/MINOR: peers: Inconsistency when dumping peer status codes.
authorFrédéric Lécaille <flecaille@haproxy.com>
Mon, 5 Oct 2020 10:33:07 +0000 (12:33 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 7 Oct 2020 05:27:01 +0000 (07:27 +0200)
commite7e2b21d274ef48da4e45d09786568d2239c9b2a
tree0263f5ad798b50ad91a2297b9411477a13f1f9e5
parent57dd6f1c5a294f8a302248d56e26201b17cfe0ec
BUG/MINOR: peers: Inconsistency when dumping peer status codes.

A peer connection status must be considered as valid only if there is an applet
which has been instantiated for the connection to the peer. So, ->statuscode
should be considered as the last known peer connection status from the last
connection to this peer if any. To reflect this, "statuscode" field of peer dump
is renamed to "last_statuscode".
This patch also add "active"/"inactive" field after the peer location type
("remote" or "local") if an applet has been instantiated for this peer connection
or not.

Thank you to Emeric for having noticed this issue.

Must be backported in >=1.9 version.
src/peers.c