summaryrefslogtreecommitdiff
path: root/source3/libsmb/clitrans.c
diff options
context:
space:
mode:
authorBo Yang <boyang@samba.org>2009-05-14 10:13:12 +0800
committerBo Yang <boyang@samba.org>2009-05-13 18:47:00 +0800
commit05379f01252fc8b449f36130bcf00c321d7a1c37 (patch)
treeb13cff0de029da42f251e6ecec4e31763b0e3fbc /source3/libsmb/clitrans.c
parent42e0cb8c0a1b8470ac8e9ad1c5a741e299debb8f (diff)
downloadsamba-05379f01252fc8b449f36130bcf00c321d7a1c37.tar.gz
s3: return proper error code in cli_smb_req_send
Signed-off-by: Bo Yang <boyang@samba.org>
Diffstat (limited to 'source3/libsmb/clitrans.c')
-rw-r--r--source3/libsmb/clitrans.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/source3/libsmb/clitrans.c b/source3/libsmb/clitrans.c
index d6d78cc6c3e..98c09ed6e73 100644
--- a/source3/libsmb/clitrans.c
+++ b/source3/libsmb/clitrans.c
@@ -1011,6 +1011,7 @@ struct tevent_req *cli_trans_send(
struct cli_trans_state *state;
int iov_count;
uint8_t wct;
+ NTSTATUS status;
req = tevent_req_create(mem_ctx, &state, struct cli_trans_state);
if (req == NULL) {
@@ -1083,8 +1084,9 @@ struct tevent_req *cli_trans_send(
return tevent_req_post(req, ev);
}
state->mid = cli_smb_req_mid(subreq);
- if (!cli_smb_req_send(subreq)) {
- tevent_req_nterror(req, NT_STATUS_NO_MEMORY);
+ status = cli_smb_req_send(subreq);
+ if (!NT_STATUS_IS_OK(status)) {
+ tevent_req_nterror(req, status);
return tevent_req_post(req, state->ev);
}
cli_state_seqnum_persistent(cli, state->mid);
@@ -1154,8 +1156,9 @@ static void cli_trans_done(struct tevent_req *subreq)
}
cli_smb_req_set_mid(subreq, state->mid);
- if (!cli_smb_req_send(subreq)) {
- status = NT_STATUS_NO_MEMORY;
+ status = cli_smb_req_send(subreq);
+
+ if (!NT_STATUS_IS_OK(status)) {
goto fail;
}
tevent_req_set_callback(subreq, cli_trans_done, req);