[PATCH] Add thread safety to socket_wrapper

Jeremy Allison jra at samba.org
Thu Mar 1 17:14:56 UTC 2018


On Thu, Mar 01, 2018 at 10:35:26AM +0100, Volker Lendecke wrote:
> On Thu, Mar 01, 2018 at 01:51:39PM +0530, Anoop C S via samba-technical wrote:
> > I have made changes accordingly. See the attached patch set.
> 
> Thanks for that change!
> 
> Small nit-pick: A boolean indicating +1 or -1 swrap_alter_refcount
> obscures the callers. Can we either make that two functions like
> swrap_inc/dec_refcount or make the parameter an integer like +1/-1.
> This would make the callers much more obvious.

My preference would be for swrap_inc()/dec_refcount(). It makes much
more sense to me and makes the action obvious.

swrap_alter_refcount() taking a bool is really opaque to follow,
sorry.

Jeremy.



More information about the samba-technical mailing list