Thanks for the review! > -----Mesaj original----- > De la: Paul Boca > Trimis: Tuesday, July 12, 2016 10:29 PM > Către: Alin Serdean <aserd...@cloudbasesolutions.com>; > dev@openvswitch.org > Subiect: RE: [PATCH 1/3] Windows: Local named pipe implementation > > Hi Alin! > > As discussed offline, please see my comments inline. > > Thanks, > Paul > > > + WaitNamedPipe(connect_path, NMPWAIT_USE_DEFAULT_WAIT); > [Paul Boca] Maybe we could use only WaitNamedPipe on open, in order to > check if the pipe exists or not, without the 3 retries and move the CreateFile > into connect function. This way we would mimic the behaviour of the sockets > implementation on this without the need of the retries. > If it doesn't just return an error otherwise return success. [Alin Gabriel Serdean: ] I was thinking of the do a createfile if the status is ERROR_PIPE_BUSY I can set a flag to the and do the create in the connect again and drop the wait all togheter. > > > +/* Passive named pipe close */ > > +static void > > +pwindows_close(struct pstream *pstream) { > > + struct pwindows_pstream *pwin = pwindows_pstream_cast(pstream); > > + DisconnectNamedPipe(pwin->fd); > > + CloseHandle(pwin->fd); > [Paul Boca] Also you could call CloseHandle on write.hEvent, read.hEvent and > connect.hEvent in order to avoid handle leaks. [Alin Gabriel Serdean: ] Forgot about them I'll to both close functions. > > > + maybe_unlink_and_free(pwin->unlink_path); > > + free(pwin->pipe_path); > > + free(pwin); > > +} > > +
_______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev