Trying to understand the idiom around tevent_req_defer_callback ...
Jeremy Allison
jra at samba.org
Mon Nov 2 21:40:31 UTC 2015
On Mon, Nov 02, 2015 at 01:05:18PM -0800, Richard Sharpe wrote:
> Hi folks,
>
> I came across this sequence in smbd_smb2_notify_reply:
>
> tevent_req_defer_callback(req, state->smb2req->sconn->ev_ctx);
>
> if (!NT_STATUS_IS_OK(state->status)) {
> tevent_req_nterror(req, state->status);
> return;
> }
>
> tevent_req_done(req);
>
> In looking at _tevent_req_notify_callback it seems the function of
> tevent_req_defer_callback is to ensure that the callback is not called
> until we get back to the creator of this request and have given it a
> chance set a callback.
>
> Do I have that correct or have I totally misunderstood?
The docs...
https://tevent.samba.org/group__tevent__request.html#ga09373077d0b39e321a196a86bfebf280
More information about the samba-technical
mailing list