]> granicus.if.org Git - curl/commitdiff
ssh: initialize per-handle data in ssh_connect()
authorKamil Dudka <kdudka@redhat.com>
Mon, 21 Oct 2013 16:47:54 +0000 (18:47 +0200)
committerKamil Dudka <kdudka@redhat.com>
Mon, 21 Oct 2013 17:00:06 +0000 (19:00 +0200)
... if not already initialized.  This fixes a regression introduced by
commit 4ad8e142da463ab208d5b5565e53291c8e5ef038, which caused test619
to intermittently fail on certain machines (namely Fedora build hosts).

lib/ssh.c

index 79f58bbf3cc0842190bcb86af284cf01ef42699f..35cb20193c2711ecbfe7115bc043a80d4c427b95 100644 (file)
--- a/lib/ssh.c
+++ b/lib/ssh.c
@@ -2725,6 +2725,10 @@ static CURLcode ssh_connect(struct connectdata *conn, bool *done)
   CURLcode result;
   struct SessionHandle *data = conn->data;
 
+  /* initialize per-handle data if not already */
+  if(!data->req.protop)
+    ssh_setup_connection(conn);
+
   /* 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;