cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: potential bug in multi_runsingle() in multi.c ?

From: 邓民文 <dengminwen_at_gmail.com>
Date: Wed, 18 Jun 2008 18:17:13 +0800

sorry, i type a mistake, i change it below

2008/6/18 邓民文 <dengminwen_at_gmail.com>:

> 2008/6/18 Daniel Stenberg <daniel_at_haxx.se>:
>
>> On Wed, 18 Jun 2008, ??? wrote:
>>
>> i think the patch may be as below, am i do right ?
>>>
>>
>> Please make patches with diff -u!
>>
>
> oh, this is not a real patch file. i am not familar with curl's source
> code, so i won't modify the cvs chunk. i just want to modify the code in my
> machine.
>
>>
>> But no, you can't just skip entries that are in use since you want
>> pipelining and thus you want to use connections even if they are in use, you
>> just want it to be detected fine and you want your new easy handle to queue
>> up for pipelining on that connection.
>>
>
>
oh, my mistake. i not read the souce code carefully.
so, is below code do right ???

in url.c

    if(match) {
      if(pipeLen == 0) {
        /* The check for a dead socket makes sense only if there
           are no handles in pipeline */
- bool dead = SocketIsDead(check->sock[FIRSTSOCKET]);
+ bool dead = (!check->inuse) && SocketIsDead(check->sock[FIRSTSOCKET]);
        if(dead) {

>
>
>
>
>> --
>>
>> / daniel.haxx.se
>>
>
>
>
> --
>
> dengminwen_at_gmail.com

-- 
此致
敬礼!
邓民文
dengminwen_at_gmail.com
Received on 2008-06-18