[PATCH] winbindd: disconnect child process if request is cancelled at main process
Stefan (metze) Metzmacher
metze at samba.org
Wed Jun 24 04:43:30 MDT 2015
> Thanks very much for reviewing.
> I've tried following your suggestions and the example and indeed the
> result is much more pleasant. Review appreciated.
> One change I did make was to use the subrequest and not the child
> pointer as a test for whether we have anything to do, and this is
> because unlike the smbcli example, the request may be queued initially
> with no real "io" request. In that state we want the cleanup to be a
> no-op. More generally it's the presence of a subrequest that calls for
> cleanup considerations and if there isn't one, then the cleanup should
> be a no-op. Given that, I did not include the setting of child to NULL
> once we're done with it, although one might want that out of general
> hygiene considerations.
I guess the /* we're done and don't need a reference to the child anymore */
comment is confusing without setting state->child = NULL;
Please create a bug report and add a reference to the commit message
and add a comment before ret = wb_simple_trans_recv(subreq, state,
explaining that we don't call TALLOC_FREE(subreq); and defer that to
Otherwise Reviewed-by: me
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 198 bytes
Desc: OpenPGP digital signature
More information about the samba-technical