[zeromq-dev] [PATCH] Fix handle connection reset during session init

Martin Sustrik sustrik at 250bpm.com
Thu Jan 20 00:18:15 CET 2011


On 01/19/2011 05:44 PM, Dhammika Pathirana wrote:

>>> +            //  Check if we had an error in previous attempt.
>>> +            if (unlikely (!(static_cast<T*>    (this)->next)))
>>> +                return (size_t) -1;
>>> +
>>
>> I think this won't work. The next step of the decoding state machine is
>> performed here irrespective of whether previous step was fully processed or
>> not.
>>
> That would be something like this->*next ()
> We're checking this->next pointer for null, not dereferencing it.

Ugh. You are right. Sorry.

Thijs, does this patch solve your problem?

Martin



More information about the zeromq-dev mailing list