cURL
Haxx ad
libcurl

Shopping cart software, Online file storage, Online photo storage, Hosted shopping cart, Contact management software, Email marketing software, Project management software, Issue tracking software, Online notepad, Web publishing software

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-library Archives

Re: Progress while connecting?

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Sun, 8 Nov 2009 23:26:48 +0100 (CET)

On Sun, 8 Nov 2009, Christian Schmitz wrote:

> Well, as far as I see the ftp login code in curl does not have progress
> calls.
>
> So from the point where the login starts to the time the actual data upload
> starts the curl library does not have a way to report progress.

Hm, if that's so then I consider that a bug. I think we should add a code
chunk to ftp_easy_statemach() that looks something like this:

diff -u -p -r1.529 ftp.c
--- lib/ftp.c 17 Sep 2009 16:11:54 -0000 1.529
+++ lib/ftp.c 8 Nov 2009 22:26:12 -0000
@@ -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,14 @@ static CURLcode ftp_easy_statemach(struc
        result = ftp_statemach_act(conn);
        if(result)
          break;
+
+ if(Curl_pgrsUpdate(conn))
+ result = CURLE_ABORTED_BY_CALLBACK;
+ else
+ result = Curl_speedcheck(data, Curl_tvnow());
+ if(result)
+ return result;
+
      }
    }

any chance you can test this and see if it makes things better for you?

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2009-11-08

These mail archives are generated by hypermail.

donate! Page updated November 16, 2009.
web site info

File upload with ASP.NET