diff options
author | Stefan Metzmacher <metze@samba.org> | 2011-09-03 15:23:44 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2011-09-05 18:01:06 +0200 |
commit | 5155a15c5cadd2dec9386576c1b4b566be1e4536 (patch) | |
tree | f138eeabbb4e21703abb47ccd693780d55800f22 | |
parent | 3e8c665465f0fa650f5f5193206e109200ea7795 (diff) | |
download | samba-5155a15c5cadd2dec9386576c1b4b566be1e4536.tar.gz samba-5155a15c5cadd2dec9386576c1b4b566be1e4536.tar.bz2 samba-5155a15c5cadd2dec9386576c1b4b566be1e4536.zip |
s3:smb2cli: don't use state->cli->smb2.mid++ as macro argument
It gets expanded multiple times.
metze
-rw-r--r-- | source3/libsmb/smb2cli_base.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source3/libsmb/smb2cli_base.c b/source3/libsmb/smb2cli_base.c index 9fc824c6b2..a25183e19b 100644 --- a/source3/libsmb/smb2cli_base.c +++ b/source3/libsmb/smb2cli_base.c @@ -252,10 +252,14 @@ NTSTATUS smb2cli_req_compound_submit(struct tevent_req **reqs, for (i=0; i<num_reqs; i++) { size_t reqlen; bool ret; + uint64_t mid; state = tevent_req_data(reqs[i], struct smb2cli_req_state); - SBVAL(state->hdr, SMB2_HDR_MESSAGE_ID, state->cli->smb2.mid++); + mid = state->cli->smb2.mid; + state->cli->smb2.mid += 1; + + SBVAL(state->hdr, SMB2_HDR_MESSAGE_ID, mid); iov[num_iov].iov_base = state->hdr; iov[num_iov].iov_len = sizeof(state->hdr); |