summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/include/client.h5
-rw-r--r--source3/libsmb/async_smb.c2
-rw-r--r--source3/libsmb/clientgen.c5
3 files changed, 8 insertions, 4 deletions
diff --git a/source3/include/client.h b/source3/include/client.h
index dfd457b891..849a7c08b4 100644
--- a/source3/include/client.h
+++ b/source3/include/client.h
@@ -54,7 +54,6 @@ struct cli_state {
int fd;
uint16 cnum;
uint16 pid;
- uint16 mid;
uint16 vuid;
int protocol;
int sec_mode;
@@ -134,6 +133,10 @@ struct cli_state {
struct tevent_req **pending;
struct {
+ uint16_t mid;
+ } smb1;
+
+ struct {
uint64_t mid;
uint32_t pid;
uint32_t tid;
diff --git a/source3/libsmb/async_smb.c b/source3/libsmb/async_smb.c
index 0493a52a0f..2c42cec6b9 100644
--- a/source3/libsmb/async_smb.c
+++ b/source3/libsmb/async_smb.c
@@ -99,7 +99,7 @@ static uint16_t cli_alloc_mid(struct cli_state *cli)
while (true) {
int i;
- result = cli->mid++;
+ result = cli->smb1.mid++;
if ((result == 0) || (result == 0xffff)) {
continue;
}
diff --git a/source3/libsmb/clientgen.c b/source3/libsmb/clientgen.c
index d6c7d64733..ddad96c826 100644
--- a/source3/libsmb/clientgen.c
+++ b/source3/libsmb/clientgen.c
@@ -71,7 +71,7 @@ void cli_setup_packet_buf(struct cli_state *cli, char *buf)
SSVAL(buf,smb_pid,cli->pid);
memset(buf+smb_pidhigh, 0, 12);
SSVAL(buf,smb_uid,cli->vuid);
- SSVAL(buf,smb_mid,cli->mid);
+ SSVAL(buf,smb_mid,cli->smb1.mid);
if (cli->protocol <= PROTOCOL_CORE) {
return;
@@ -186,7 +186,6 @@ struct cli_state *cli_initialise_ex(int signing_state)
cli->raw_status = NT_STATUS_INTERNAL_ERROR;
cli->cnum = -1;
cli->pid = (uint16)sys_getpid();
- cli->mid = 1;
cli->vuid = UID_FIELD_INVALID;
cli->protocol = PROTOCOL_NT1;
cli->timeout = 20000; /* Timeout is in milliseconds. */
@@ -240,6 +239,8 @@ struct cli_state *cli_initialise_ex(int signing_state)
cli->initialised = 1;
+ cli->smb1.mid = 1;
+
return cli;
/* Clean up after malloc() error */