aboutsummaryrefslogtreecommitdiff
path: root/lib/ssh.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2014-05-20 10:32:23 +0200
committerDaniel Stenberg <daniel@haxx.se>2014-05-22 00:34:10 +0200
commitdf13f8e8c2199b572f19d295e5c59e7502204b3a (patch)
treeb664dc79f3de9d810f13dd01decbd0b03fcb06b5 /lib/ssh.c
parent491767418bd3e69867d48c2f9b4ea58f7112a879 (diff)
bits.close: introduce connection close tracking
Make all code use connclose() and connkeep() when changing the "close state" for a connection. These two macros take a string argument with an explanation, and debug builds of curl will include that in the debug output. Helps tracking connection re-use/close issues.
Diffstat (limited to 'lib/ssh.c')
-rw-r--r--lib/ssh.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/ssh.c b/lib/ssh.c
index 5e18ca722..b248b43a0 100644
--- a/lib/ssh.c
+++ b/lib/ssh.c
@@ -2544,7 +2544,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
memset(sshc, 0, sizeof(struct ssh_conn));
- conn->bits.close = TRUE;
+ connclose(conn, "SSH session free");
sshc->state = SSH_SESSION_FREE; /* current */
sshc->nextstate = SSH_NO_STATE;
state(conn, SSH_STOP);
@@ -2747,7 +2747,7 @@ static CURLcode ssh_connect(struct connectdata *conn, bool *done)
/* We default to persistent connections. We set this already in this connect
function to make the re-use checks properly be able to check this bit. */
- conn->bits.close = FALSE;
+ connkeep(conn, "SSH default");
if(conn->handler->protocol & CURLPROTO_SCP) {
conn->recv[FIRSTSOCKET] = scp_recv;