cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re[2]: Bug in multi_runsingle

From: Dmitriy Sergeyev <dsergeyev_at_issart.com>
Date: Thu, 31 Aug 2006 19:32:44 +0700

Thursday, August 31, 2006, 6:40:01 PM, Daniel Stenberg wrote:

>> I.e. we need to replace multi.c(639):
>> multistate(easy, CURLM_STATE_WAITCONNECT);
>>
>> with following:
>> result = CURLM_CALL_MULTI_PERFORM;
>>
>> if(protocol_connect)
>> multistate(easy, CURLM_STATE_DO);
>> else
>> multistate(easy, CURLM_STATE_WAITCONNECT);
> I don't think the CURLM_CALL_MULTI_PERFORM assignment should be there like
> that, and in fact I'm not sure it should be like that in the
> CURLM_STATE_CONNECT case either.
> Can you try your test case again without that line and see if it causes any
> noticable problem? If it must be there, it should at least only be set for the
> STATE_DO case.

If we omit this assignment than user program can call curl_multi_fdset
which returns zero-sized read_fd_set. Is this behavior allowable?
Because currently my program implies in that case that something wrong
happened and returns error. And currently it was always true.

Assigning CURLM_CALL_MULTI_PERFORM only for CURLM_STATE_DO looks work
good and I haven't noticed any problems. Even when I've moved this
assignment in CURLM_STATE_CONNECT.

-- 
Best regards,
 Dmitriy                            mailto:dsergeyev_at_issart.com
Received on 2006-08-31