From dbb6bfd420f14c997aa1763bd233ee51612767ae Mon Sep 17 00:00:00 2001 From: Kamil Dudka Date: Aug 21 2009 09:26:47 +0000 Subject: - avoid tight loop during a sftp upload --- diff --git a/curl-7.19.6-sftp-poll.patch b/curl-7.19.6-sftp-poll.patch new file mode 100644 index 0000000..164e499 --- /dev/null +++ b/curl-7.19.6-sftp-poll.patch @@ -0,0 +1,18 @@ +diff -rup curl-7.19.6.orig/lib/ssh.c curl-7.19.6/lib/ssh.c +--- curl-7.19.6.orig/lib/ssh.c 2009-08-20 15:33:43.007858118 +0200 ++++ curl-7.19.6/lib/ssh.c 2009-08-20 15:35:31.806608061 +0200 +@@ -2753,8 +2753,13 @@ ssize_t Curl_sftp_send(struct connectdat + + ssh_block2waitfor(conn, (nwrite == LIBSSH2_ERROR_EAGAIN)?TRUE:FALSE); + +- if(nwrite == LIBSSH2_ERROR_EAGAIN) ++ if(nwrite == LIBSSH2_ERROR_EAGAIN) { ++ if (conn->proto.sshc.waitfor & KEEP_RECV) ++ /* wait for the socket to become ready */ ++ Curl_socket_ready(conn->sock[FIRSTSOCKET], CURL_SOCKET_BAD, 1000); ++ + return 0; ++ } + + return nwrite; + } diff --git a/curl.spec b/curl.spec index dd5cb27..82e3c9f 100644 --- a/curl.spec +++ b/curl.spec @@ -1,7 +1,7 @@ Summary: A utility for getting files from remote servers (FTP, HTTP, and others) Name: curl Version: 7.19.6 -Release: 2%{?dist} +Release: 3%{?dist} License: MIT Group: Applications/Internet Source: http://curl.haxx.se/download/%{name}-%{version}.tar.lzma @@ -10,6 +10,7 @@ Patch1: curl-7.19.6-verifyhost.patch Patch101: curl-7.15.3-multilib.patch Patch102: curl-7.16.0-privlibs.patch Patch103: curl-7.19.4-debug.patch +Patch201: curl-7.19.6-sftp-poll.patch Provides: webclient URL: http://curl.haxx.se/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -60,6 +61,9 @@ use cURL's capabilities internally. %patch102 -p1 %patch103 -p1 +# workarounds (not intended to be applied upstream) +%patch201 -p1 + # Convert docs to UTF-8 for f in CHANGES README; do iconv -f iso-8859-1 -t utf8 < ${f} > ${f}.utf8 @@ -141,6 +145,10 @@ rm -rf $RPM_BUILD_ROOT %{_datadir}/aclocal/libcurl.m4 %changelog +* Fri Aug 21 2009 Kamil Dudka 7.19.6-3 +- avoid tight loop during a sftp upload +- http://permalink.gmane.org/gmane.comp.web.curl.library/24744 + * Tue Aug 18 2009 Kamil Dudka 7.19.6-2 - let curl package depend on the same version of libcurl