status = state->transport->read_recv(subreq, &received);
TALLOC_FREE(subreq);
- if (!NT_STATUS_IS_OK(status)) {
- tevent_req_nterror(req, status);
+ if (tevent_req_nterror(req, status)) {
return;
}
status = state->transport->write_recv(subreq, &written);
TALLOC_FREE(subreq);
- if (!NT_STATUS_IS_OK(status)) {
- tevent_req_nterror(req, status);
+ if (tevent_req_nterror(req, status)) {
return;
}
status = cli_api_pipe_recv(subreq, state, &rdata, &rdata_len);
TALLOC_FREE(subreq);
- if (!NT_STATUS_IS_OK(status)) {
+ if (tevent_req_nterror(req, status)) {;
DEBUG(5, ("cli_api_pipe failed: %s\n", nt_errstr(status)));
- tevent_req_nterror(req, status);
return;
}
status = get_complete_frag_recv(subreq);
TALLOC_FREE(subreq);
- if (!NT_STATUS_IS_OK(status)) {
+ if (tevent_req_nterror(req, status)) {
DEBUG(5, ("get_complete_frag failed: %s\n",
nt_errstr(status)));
- tevent_req_nterror(req, status);
return;
}
* For now do it sync...
*/
TALLOC_FREE(state->cli->transport);
- tevent_req_nterror(req, NT_STATUS_NO_MEMORY);
+ tevent_req_oom(req);
return;
}
status = dcerpc_pull_ncacn_packet(state->pkt,
&state->incoming_frag,
state->pkt);
- if (!NT_STATUS_IS_OK(status)) {
+ if (tevent_req_nterror(req, status)) {
/*
* TODO: do a real async disconnect ...
*
* For now do it sync...
*/
TALLOC_FREE(state->cli->transport);
- tevent_req_nterror(req, status);
return;
}
*/
TALLOC_FREE(state->cli->transport);
}
- if (!NT_STATUS_IS_OK(status)) {
- tevent_req_nterror(req, status);
+ if (tevent_req_nterror(req, status)) {
return;
}
* For now do it sync...
*/
TALLOC_FREE(state->cli->transport);
- tevent_req_nterror(req, NT_STATUS_NO_MEMORY);
+ tevent_req_oom(req);
return;
}
}
status = rpc_write_recv(subreq);
TALLOC_FREE(subreq);
- if (!NT_STATUS_IS_OK(status)) {
- tevent_req_nterror(req, status);
+ if (tevent_req_nterror(req, status)) {
return;
}
status = prepare_next_frag(state, &is_last_frag);
- if (!NT_STATUS_IS_OK(status)) {
- tevent_req_nterror(req, status);
+ if (tevent_req_nterror(req, status)) {
return;
}
status = rpc_api_pipe_recv(subreq, state, NULL, &state->reply_pdu);
TALLOC_FREE(subreq);
- if (!NT_STATUS_IS_OK(status)) {
- tevent_req_nterror(req, status);
+ if (tevent_req_nterror(req, status)) {
return;
}
status = rpc_api_pipe_recv(subreq, talloc_tos(), &pkt, NULL);
TALLOC_FREE(subreq);
- if (!NT_STATUS_IS_OK(status)) {
+ if (tevent_req_nterror(req, status)) {
DEBUG(3, ("rpc_pipe_bind: %s bind request returned %s\n",
rpccli_pipe_txt(talloc_tos(), state->cli),
nt_errstr(status)));
- tevent_req_nterror(req, status);
return;
}
status = dcerpc_pull_auth_trailer(pkt, talloc_tos(),
&pkt->u.bind_ack.auth_info,
&auth, NULL, true);
- if (!NT_STATUS_IS_OK(status)) {
+ if (tevent_req_nterror(req, status)) {
DEBUG(0, ("Failed to pull dcerpc auth: %s.\n",
nt_errstr(status)));
- tevent_req_nterror(req, status);
return;
}
status = rpc_api_pipe_req_recv(subreq, state, &state->out_data);
TALLOC_FREE(subreq);
- if (!NT_STATUS_IS_OK(status)) {
- tevent_req_nterror(req, status);
+ if (tevent_req_nterror(req, status)) {
return;
}