curl-library
Re: Multi_add_handle question
Date: Tue, 31 Aug 2004 07:54:26 +0200 (CEST)
On Mon, 30 Aug 2004, Tarendash, David wrote:
> Is returning the following:
> CCURLInfo::AddHandle: curl_multi_add_handle failed [-1:please call
> curl_multi_perform() soon]
>
> If I have what I assume is a valid CURL and CURLM object (the init's
> succeeded), is this a valid response? Most of the examples I have seen
> don't bother to check for the response to multi_add_handle().
I don't exactly remember how I reasoned when I made this function do this, but
yes, curl_multi_add_handle() currently returns CURLM_CALL_MULTI_PERFORM when
everything is fine.
I would call this a minor bug, and it should return CURLM_OK instead. I'll
change this for the next version.
You can work around this by checking if the error code is greater than 0,
which then means error, and if it is <= 0 it is OK.
Thanks for pointing this out!
-- Daniel Stenberg -- http://curl.haxx.se -- http://daniel.haxx.se Dedicated custom curl help for hire: http://haxx.se/curl.htmlReceived on 2004-08-31