From 07416b61e3c403ea56370858a618f877dcaee57d Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 19 Dec 2008 21:14:52 +0000 Subject: - Using the libssh2 0.19 function libssh2_session_block_directions(), libcurl now has an improved ability to do right when the multi interface (both "regular" and multi_socket) is used for SCP and SFTP transfers. This should result in (much) less busy-loop situations and thus less CPU usage with no speed loss. --- lib/transfer.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/transfer.c') diff --git a/lib/transfer.c b/lib/transfer.c index 4313680ef..58279946d 100644 --- a/lib/transfer.c +++ b/lib/transfer.c @@ -1524,6 +1524,7 @@ static CURLcode readwrite_upload(struct SessionHandle *data, data->req.upload_fromhere, /* buffer pointer */ data->req.upload_present, /* buffer size */ &bytes_written); /* actually send away */ + if(result) return result; @@ -1744,6 +1745,9 @@ int Curl_single_getsock(const struct connectdata *conn, int bitmap = GETSOCK_BLANK; unsigned sockindex = 0; + if(conn->handler->perform_getsock) + return conn->handler->perform_getsock(conn, sock, numsocks); + if(numsocks < 2) /* simple check but we might need two slots */ return GETSOCK_BLANK; -- cgit v1.2.3