Dear relayd user,

I am glad there is a connection state in relayd, this sound a better
design,
the former patch proposed by B.Provost was already a step toward this.

This State is also a good tool to remove the volatile inflight;
Fixing the race condition the OP was working on.

Should we (I) propose another patch ?

On Sun, May 31, 2015 at 7:45 PM, Alexander Bluhm <[email protected]>
wrote:

> On Sat, May 30, 2015 at 01:40:24PM +0200, Claudio Jeker wrote:
> > New version that now passes all regress tests. It got a fair bit more
> > complex because the F_TLSINSPECT case results in multiple entries of
> > relay_connect and relay_connected. So I switched to use a state variable
> > instead of a flag. It seems to work (and also works in the EMFILE/ENFILE
> > case). At least it "worked" for me by forcing that code path all the
> time.
>
> > @@ -1673,6 +1697,7 @@ relay_close(struct rsession *con, const
> >                       event_add(&rlay->rl_ev, NULL);
> >               }
> >       }
> > +     con->se_out.state = INIT;
> >
> >       if (con->se_out.buf != NULL)
> >               free(con->se_out.buf);
>
> Resetting the state is not neccessary, free(con) will invalidate
> the storage.
>
> anyway, OK bluhm@
>
>


-- 
---------------------------------------------------------------------------------------------------------------------
() ascii ribbon campaign - against html e-mail
/\

Reply via email to