summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2011-06-08 16:11:00 +0200
committerJeremy Allison <jra@samba.org>2011-06-10 19:27:05 +0200
commit5146c9ba9df063d6611abe356f9262adb027b091 (patch)
treee7baa4f97084e857b6a97fc0ea4df0be1313144a /source3
parent0a8fd50bd806e925a915c74cb86733481b2144f6 (diff)
downloadsamba-5146c9ba9df063d6611abe356f9262adb027b091.tar.gz
samba-5146c9ba9df063d6611abe356f9262adb027b091.tar.bz2
samba-5146c9ba9df063d6611abe356f9262adb027b091.zip
s3:libsmb/clitrans: move MID handling to the end of cli_trans_send() and add a comment
metze
Diffstat (limited to 'source3')
-rw-r--r--source3/libsmb/clitrans.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/source3/libsmb/clitrans.c b/source3/libsmb/clitrans.c
index cf6809b4c0..82a73ee2c0 100644
--- a/source3/libsmb/clitrans.c
+++ b/source3/libsmb/clitrans.c
@@ -441,14 +441,23 @@ struct tevent_req *cli_trans_send(
if (tevent_req_nomem(subreq, req)) {
return tevent_req_post(req, ev);
}
- state->mid = cli_smb_req_mid(subreq);
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);
tevent_req_set_callback(subreq, cli_trans_done, req);
+
+ /*
+ * Now get the MID of the primary request
+ * and mark it as persistent. This means
+ * we will able to send and receive multiple
+ * SMB pdus using this MID in both directions
+ * (including correct SMB signing).
+ */
+ state->mid = cli_smb_req_mid(subreq);
+ cli_state_seqnum_persistent(cli, state->mid);
+
return req;
}