1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-06 05:52:48 -05:00

Log when a network connection succeeds.

Now I've got an enum for PlugLogType, it's easier to add things to it.
We were giving a blow-by-blow account of each connection attempt, and
when it failed, saying what went wrong before we moved on to the next
candidate address, but when one finally succeeded, we never logged
_that_. Now we do.
This commit is contained in:
Simon Tatham
2020-02-07 19:18:50 +00:00
parent 91bb475087
commit 630cac3aa2
5 changed files with 33 additions and 5 deletions

View File

@ -47,6 +47,7 @@ struct Plug {
typedef enum PlugLogType {
PLUGLOG_CONNECT_TRYING,
PLUGLOG_CONNECT_FAILED,
PLUGLOG_CONNECT_SUCCESS,
PLUGLOG_PROXY_MSG,
} PlugLogType;
@ -66,6 +67,9 @@ struct PlugVtable {
* addresses to fall back to. When it _is_ fatal, the closing()
* function will be called.
*
* - PLUGLOG_CONNECT_SUCCESS means we have succeeded in
* connecting to address `addr'.
*
* - PLUGLOG_PROXY_MSG means that error_msg contains a line of
* logging information from whatever the connection is being
* proxied through. This will typically be a wodge of