[PATCH] messaging3 improvements

Stefan (metze) Metzmacher metze at samba.org
Wed May 7 14:23:12 MDT 2014


Hi Volker,

>  	/*
>  	 * Just set the [new_]waiters entry to NULL, be careful not to mess
>  	 * with the other "waiters" array contents. We are often called from
> @@ -562,6 +571,13 @@ static void messaging_filtered_read_done(struct tevent_req *req,
>  	if (tevent_req_nomem(state->rec, req)) {
>  		return;
>  	}
> +
> +	/*
> +	 * We have to defer the callback here, as we might be called from
> +	 * within a different tevent_context than state->ev
> +	 */
> +	tevent_req_defer_callback(req, state->ev);
> +
>  	tevent_req_done(req);
>  }

tevent_req_defer_callback() should to be called directly after
tevent_req_create() in this case. This is important for
error cases which are handled by tevent_req_nomem() or tevent_req_error().

With this aspect fixed you have my review for the whole patchset.

metze

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 263 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20140507/9429781d/attachment.pgp>


More information about the samba-technical mailing list