cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: [PATCH] pausing a transfer, take one

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Sun, 23 Dec 2007 13:42:38 +0100 (CET)

On Sat, 22 Dec 2007, Dmitriy Sergeyev wrote:

> Unfortunately retrieving of resources not works properly when callback uses
> CURL_WRITEFUNC_PAUSE.

Ok, here's a new patch that fixes two bugs. One that prevented
curl_easy_pause() from working and one that made paused transfers finish if
the last write call returned PAUSE. But also note that there's an updated
version of your test code, as you had a bug too! ;-) The important diff for
that change is below.

Using this version of the patch with this version of your test code, it seems
to work!

--- test_pause01.c~ 2007-12-22 23:59:13.000000000 +0100
+++ test_pause01.c 2007-12-23 13:26:48.000000000 +0100
@@ -99,8 +99,8 @@
                          {
                                  if (--waitCount == 0)
                                  {
- curl_easy_pause(easy, CURLPAUSE_CONT);
                                          state = STATE_WRITE;
+ curl_easy_pause(easy, CURLPAUSE_CONT);
                                  }
                                  break;
                          }

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html


Received on 2007-12-23