[PATCH] smbd: Use mutex instead of fcntl lock for echohandler coordination
Jeremy Allison
jra at samba.org
Tue Jul 8 12:29:53 MDT 2014
On Tue, Jul 08, 2014 at 10:58:24AM -0700, Christof Schmitt wrote:
> On Tue, Jul 08, 2014 at 12:57:05AM +0200, Stefan (metze) Metzmacher wrote:
> > Hi Christof,
> >
> > > +static bool smbd_echo_active(struct smbd_server_connection *sconn)
> > > +{
> > > + return (sconn->smb1.echo_handler.socket_lock_fd != -1
> > > +#ifdef HAVE_ROBUST_MUTEXES
> > > + || sconn->smb1.echo_handler.socket_mutex != NULL
> > > +#endif
> > > + );
> > > +}
> >
> > Can you please use if statements like this:
> >
> >
> > if (sconn->smb1.echo_handler.socket_lock_fd != -1) {
> > return true;
> > }
> >
> > #ifdef HAVE_ROBUST_MUTEXES
> > if (sconn->smb1.echo_handler.socket_mutex != NULL) {
> > return true;
> > }
> > #endif
> >
> > return false;
> >
> > The rest look good thanks!
>
> Updated in the attached patch.
LGTM - pushed - thanks !
More information about the samba-technical
mailing list