Trying to understand the idiom around tevent_req_defer_callback ...

Richard Sharpe realrichardsharpe at
Mon Nov 2 21:05:18 UTC 2015

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);


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?

Richard Sharpe

More information about the samba-technical mailing list