cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re[3]: ftp downloading operation result

From: Spoon Man <spoonman_at_inbox.ru>
Date: Tue, 26 Jul 2011 19:05:28 +0400

26 июля 2011, 14:45 от Spoon Man <spoonman_at_inbox.ru>:
 

Sorry, I used curl 7.21.1 (didn't update due to inspected pieces of code left unchanged). Seems this problem was fixed. Will report if it will be reproduced anyway...
 

 
   Actually, it reproduces in version 7.21.7 too. I still didn't test on trunk, but there is same ftp_doing() implementation. I propose following fix:

diff -u curl-7.21.7/lib/ftp.c curl-7.21.7-1/lib/ftp.c
--- curl-7.21.7/lib/ftp.c       2011-06-07 00:10:13.000000000 +0400
+++ curl-7.21.7-1/lib/ftp.c     2011-07-26 18:41:34.000000000 +0400
@@ -4104,6 +4104,11 @@
   CURLcode result;
   result = ftp_multi_statemach(conn, dophase_done);
 
+  if (result != CURLE_OK) {
+    failf(conn->data, "DO phase is failed");
+    return result;
+  }
+
   if(*dophase_done) {
     result = ftp_dophase_done(conn, FALSE /* not connected */ );


But I'm not quite sure whether it completely fixes the problem.

And another problem is unexpected timeout.

Here are my debug printout:

2011-07-26 18:39:21.172 MSK INFOTEXT: ftp.c(1772):ftp_state_pasv_resp(): connecting to SOCKS4
2011-07-26 18:39:21.172 MSK INFOTEXT: socks.c(145):Curl_SOCKS4(): working. timeout = 299905
2011-07-26 18:39:21.172 MSK INFOTEXT: socks.c(82):Curl_blockread_all():conntime(299936) > conn_timeout(299905)
2011-07-26 18:39:21.172 MSK INFOTEXT: Failed to receive SOCKS4 connect request ack. result=28 timeout=299905 sock=75
2011-07-26 18:39:21.172 MSK INFOTEXT: ftp.c(1775): ftp_state_pasv_resp(): Curl_SOCKS4() returned 7

No real timeout has occured (it would be 5 minutes). I guess a connection time remains set to the first time stamp it was created.

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2011-07-26