summaryrefslogtreecommitdiffstats
path: root/source3/libsmb/clireadwrite.c
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2011-04-02 16:02:23 +0200
committerVolker Lendecke <vl@samba.org>2011-04-16 15:34:58 +0200
commit10a552a9570bd274796639ba80d46d2d22828271 (patch)
tree09338311bf4d88de6edcf8b68f50044f4eecd888 /source3/libsmb/clireadwrite.c
parent9f9d183c18527be72dc05cf543d735af15f9d4e8 (diff)
downloadsamba-10a552a9570bd274796639ba80d46d2d22828271.tar.gz
samba-10a552a9570bd274796639ba80d46d2d22828271.tar.xz
samba-10a552a9570bd274796639ba80d46d2d22828271.zip
s3: Use tevent_req_nterror properly in a few places
Diffstat (limited to 'source3/libsmb/clireadwrite.c')
-rw-r--r--source3/libsmb/clireadwrite.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/source3/libsmb/clireadwrite.c b/source3/libsmb/clireadwrite.c
index 59f8ac3aee5..e243f8a0fc4 100644
--- a/source3/libsmb/clireadwrite.c
+++ b/source3/libsmb/clireadwrite.c
@@ -148,8 +148,7 @@ struct tevent_req *cli_read_andx_send(TALLOC_CTX *mem_ctx,
}
status = cli_smb_req_send(subreq);
- if (!NT_STATUS_IS_OK(status)) {
- tevent_req_nterror(req, status);
+ if (tevent_req_nterror(req, status)) {
return tevent_req_post(req, ev);
}
return req;
@@ -282,8 +281,7 @@ static void cli_readall_done(struct tevent_req *subreq)
NTSTATUS status;
status = cli_read_andx_recv(subreq, &received, &buf);
- if (!NT_STATUS_IS_OK(status)) {
- tevent_req_nterror(req, status);
+ if (tevent_req_nterror(req, status)) {
return;
}
@@ -569,8 +567,7 @@ static void cli_pull_read_done(struct tevent_req *subreq)
status = state->sink((char *)top_subreq->buf,
top_subreq->received, state->priv);
- if (!NT_STATUS_IS_OK(status)) {
- tevent_req_nterror(state->req, status);
+ if (tevent_req_nterror(state->req, status)) {
return;
}
state->pushed += top_subreq->received;
@@ -1013,8 +1010,7 @@ struct tevent_req *cli_write_andx_send(TALLOC_CTX *mem_ctx,
}
status = cli_smb_req_send(subreq);
- if (!NT_STATUS_IS_OK(status)) {
- tevent_req_nterror(req, status);
+ if (tevent_req_nterror(req, status)) {
return tevent_req_post(req, ev);
}
return req;
@@ -1114,8 +1110,7 @@ static void cli_writeall_written(struct tevent_req *subreq)
status = cli_write_andx_recv(subreq, &written);
TALLOC_FREE(subreq);
- if (!NT_STATUS_IS_OK(status)) {
- tevent_req_nterror(req, status);
+ if (tevent_req_nterror(req, status)) {
return;
}
@@ -1313,8 +1308,7 @@ static void cli_push_written(struct tevent_req *subreq)
status = cli_writeall_recv(subreq);
TALLOC_FREE(subreq);
TALLOC_FREE(substate);
- if (!NT_STATUS_IS_OK(status)) {
- tevent_req_nterror(req, status);
+ if (tevent_req_nterror(req, status)) {
return;
}