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

Dhammika Pathirana dhammika at gmail.com
Wed Jan 19 17:44:26 CET 2011


Hi Martin,

On Wed, Jan 19, 2011 at 6:22 AM, Martin Sustrik <sustrik at 250bpm.com> wrote:
> Dhammika,
>
>> +            //  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.


Dhammika



More information about the zeromq-dev mailing list