summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Housley <jim@thehousleys.net>2007-06-12 16:15:20 +0000
committerJames Housley <jim@thehousleys.net>2007-06-12 16:15:20 +0000
commit6f59e19b91d2b1f0f05b94ec40f4f6e4d6cddbd3 (patch)
tree893c4cd2a7254cff95dc129475624b3c6d3784bd
parent7800b56dc8835056743771af699d57b0b5b9da1f (diff)
downloadgnurl-6f59e19b91d2b1f0f05b94ec40f4f6e4d6cddbd3.tar.gz
gnurl-6f59e19b91d2b1f0f05b94ec40f4f6e4d6cddbd3.tar.bz2
gnurl-6f59e19b91d2b1f0f05b94ec40f4f6e4d6cddbd3.zip
While connect and transfer works fine in non-blocking mode for the test
suite, transfer fails in the real world. So after connect set to blocking as full non-blocking is migrated out.
-rw-r--r--lib/ssh.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/lib/ssh.c b/lib/ssh.c
index 28fe1ffe7..8b58abf3e 100644
--- a/lib/ssh.c
+++ b/lib/ssh.c
@@ -302,6 +302,9 @@ static CURLcode ssh_statemach_act(struct connectdata *conn)
break;
}
+ /* Set libssh2 to non-blocking, since cURL is all non-blocking */
+ libssh2_session_set_blocking(ssh->ssh_session, 0);
+
#ifdef CURL_LIBSSH2_DEBUG
/*
* Before we authenticate we should check the hostkey's fingerprint
@@ -654,6 +657,16 @@ static CURLcode ssh_statemach_act(struct connectdata *conn)
Curl_safefree(working_path);
ssh->path = real_path;
+ /*
+ *****************************************
+ *****************************************
+ ** TEMPORARY **
+ *****************************************
+ *****************************************
+ */
+ /* Set libssh2 to non-blocking, since cURL is all non-blocking */
+ libssh2_session_set_blocking(ssh->ssh_session, 1);
+
/* Connect is all done */
state(conn, SSH_STOP);
}
@@ -832,9 +845,6 @@ CURLcode Curl_ssh_connect(struct connectdata *conn, bool *done)
#endif /* CURL_LIBSSH2_DEBUG */
#if (LIBSSH2_APINO >= 200706012030)
- /* Set libssh2 to non-blocking, since cURL is all non-blocking */
- libssh2_session_set_blocking(ssh->ssh_session, 0);
-
state(conn, SSH_S_STARTUP);
if (data->state.used_interface == Curl_if_multi)