cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: curl_easy_pause bugs

From: Dmitriy Sergeyev <dsergeyev_at_issart.com>
Date: Thu, 4 Sep 2008 16:56:00 +0700

On Thu, Sep 4, 2008 at 2:48 PM, Daniel Stenberg <daniel_at_haxx.se> wrote:

> Right, so I figure this approach is more like it:

Thanks a lot! The patch works for me and surely fixes crashes.

And I've got another question, regarding the behavior of curl_easy_pause().
In case of continue of paused operation with data it calls
write-callback immediately. And if callback returns error, only
curl_easy_pause() returns failure code, but the transfer itself not
fails and ignores this write-callback failure. If we will not remove
easy handle by hands from multi handle, the transfer will continue.
This seems quite illogical for me, as expected behavior according to
documentation is that we could rely on return code from write-callback
and transfer should fail with CURLE_WRITE_ERROR.
Furthermore, as for me, I think curl_easy_pause() shouldn't return
error codes on write-callback failures at all. May be the behavior
will be more transparent if curl_easy_pause() affects only the state
of transfer, even if it calls write-callback. But any transfer-related
failure reveals only after curl_multi_perform() call, as usual.

-- 
Best regards,
 Dmitriy Sergeyev, C++ Developer
of ISS Art, Ltd., Omsk, Russia
Web: http://www.issart.com
Received on 2008-09-04