aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2010-08-01 23:50:46 +0200
committerDaniel Stenberg <daniel@haxx.se>2010-08-01 23:50:46 +0200
commit811fcccfc97ee6545f1b9d28ac0dd9ea93a81ab8 (patch)
treeabdfed4f6581f98766774fef851b428da8c21d16 /lib
parentb552ca223eaf94c83b097796bf86d0616e983485 (diff)
multi: fix FTPS connecting the data connection with OpenSSL
Commit 496002ea1cd76af7f (released in 7.20.1) broke FTPS when using the multi interface and OpenSSL was used. The condition for the non-blocking connect was incorrect. Reported by: Georg Lippitsch Bug: http://curl.haxx.se/mail/lib-2010-07/0270.html
Diffstat (limited to 'lib')
-rw-r--r--lib/ssluse.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/lib/ssluse.c b/lib/ssluse.c
index 1b4da33d4..08ce4ccc7 100644
--- a/lib/ssluse.c
+++ b/lib/ssluse.c
@@ -2430,15 +2430,14 @@ ossl_connect_common(struct connectdata *conn,
/* socket is readable or writable */
}
- /* Run transaction, and return to the caller if it failed or if
- * this connection is part of a multi handle and this loop would
- * execute again. This permits the owner of a multi handle to
- * abort a connection attempt before step2 has completed while
- * ensuring that a client using select() or epoll() will always
- * have a valid fdset to wait on.
+ /* Run transaction, and return to the caller if it failed or if this
+ * connection is done nonblocking and this loop would execute again. This
+ * permits the owner of a multi handle to abort a connection attempt
+ * before step2 has completed while ensuring that a client using select()
+ * or epoll() will always have a valid fdset to wait on.
*/
retcode = ossl_connect_step2(conn, sockindex);
- if(retcode || (data->state.used_interface == Curl_if_multi &&
+ if(retcode || (nonblocking &&
(ssl_connect_2 == connssl->connecting_state ||
ssl_connect_2_reading == connssl->connecting_state ||
ssl_connect_2_writing == connssl->connecting_state)))