- Christian Schmitz noticed that the progress meter/callback was not properly
authorDaniel Stenberg <daniel@haxx.se>
Wed, 11 Nov 2009 09:01:43 +0000 (09:01 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 11 Nov 2009 09:01:43 +0000 (09:01 +0000)
  used during the FTP connection phase (after the actual TCP connect), while
  it of course should be. I also made the speed check get called correctly so
  that really slow servers will trigger that properly too.

CHANGES
RELEASE-NOTES
lib/ftp.c

diff --git a/CHANGES b/CHANGES
index 2d7b7ba..3bd8809 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -6,6 +6,12 @@
 
                                   Changelog
 
+Daniel Stenberg (11 Nov 2009)
+- Christian Schmitz noticed that the progress meter/callback was not properly
+  used during the FTP connection phase (after the actual TCP connect), while
+  it of course should be. I also made the speed check get called correctly so
+  that really slow servers will trigger that properly too.
+
 Kamil Dudka (5 Nov 2009)
 - Dropped misleading timeouts in libcurl-NSS and made sure the SSL socket works
   in non-blocking mode.
index fc8c3dd..08d7215 100644 (file)
@@ -15,6 +15,7 @@ This release includes the following bugfixes:
 
  o progress meter percentage and transfer time estimates fixes
  o portability enhancement for OS's without orthogonal directory tree structure
+ o progress meter/callback during FTP connection
 
 This release includes the following known bugs:
 
@@ -23,6 +24,6 @@ This release includes the following known bugs:
 This release would not have looked like this without help, code, reports and
 advice from friends like these:
 
+ Yang Tse, Kamil Dudka, Christian Schmitz
 
         Thanks! (and sorry if I forgot to mention someone)
index a233223..14d4b92 100644 (file)
--- a/lib/ftp.c
+++ b/lib/ftp.c
@@ -90,6 +90,7 @@
 #include "multiif.h"
 #include "url.h"
 #include "rawstr.h"
+#include "speedcheck.h"
 
 #define _MPRINTF_REPLACE /* use our functions only */
 #include <curl/mprintf.h>
@@ -3069,6 +3070,13 @@ static CURLcode ftp_easy_statemach(struct connectdata *conn)
       result = ftp_statemach_act(conn);
       if(result)
         break;
+      else if(Curl_pgrsUpdate(conn))
+        result = CURLE_ABORTED_BY_CALLBACK;
+      else
+        result = Curl_speedcheck(data, Curl_tvnow());
+
+      if(result)
+        break;
     }
   }