[zeromq-dev] [PATCH]

Daniel Sentenac sentenac at ego-gw.it
Mon Oct 11 10:58:33 CEST 2010


Martin Sustrik wrote:
> Hi Daniel,
>>>           if (!write (pipes [i], msg_))
>>> -            content->refcnt.sub (1);
>>> +            passivised++;
>>>           else
>>>               i++;
>>>      
>> I think the problem comes from a useless  reference subtraction in the
>> first test case, since you subtract all the passivised in a second time.
>>    
> Note that the second line in the patch above is *removed*. Have you 
> applied the patch by hand?
>
>> I tried the following and it works well with no leak in my video
>> distribution test:
>>
>>   //  Push the message to all destinations.
>>      int passivised = 0;
>>      for (pipes_t::size_type i = 0; i != active;) {
>>        if (!write (pipes [i], msg_) )
>>      passivised++;
>>        else
>>      i++;
>>      }
>>    
> Yes. That's how it should look like.
>
> I am going to apply the patch.
>
> Thanks!
> Martin
Ok, great !
thanks a lot
Daniel



More information about the zeromq-dev mailing list