summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2011-09-13 15:07:29 +0200
committerStefan Metzmacher <metze@samba.org>2011-09-15 12:12:23 +0200
commitb02d27ae056b08372861de4980fca1e03cb8d091 (patch)
treeb9ead50dd516c810b6f7ae592dae59ea9ea55ac2
parent595f0020d4bc6c43adf4e73021e5fffab3354bfd (diff)
downloadsamba-b02d27ae056b08372861de4980fca1e03cb8d091.tar.gz
samba-b02d27ae056b08372861de4980fca1e03cb8d091.tar.bz2
samba-b02d27ae056b08372861de4980fca1e03cb8d091.zip
s3:libsmb: move cli->smb1.mid to cli->conn.smb1.mid
metze
-rw-r--r--source3/include/client.h3
-rw-r--r--source3/libsmb/async_smb.c2
-rw-r--r--source3/libsmb/clientgen.c3
3 files changed, 5 insertions, 3 deletions
diff --git a/source3/include/client.h b/source3/include/client.h
index 43b1541925..77e1240046 100644
--- a/source3/include/client.h
+++ b/source3/include/client.h
@@ -137,11 +137,12 @@ struct cli_state {
} server;
uint32_t capabilities;
+
+ uint16_t mid;
} smb1;
} conn;
struct {
- uint16_t mid;
uint16_t pid;
uint16_t vc_num;
uint16_t tid;
diff --git a/source3/libsmb/async_smb.c b/source3/libsmb/async_smb.c
index e55d5bd365..cb4e63035b 100644
--- a/source3/libsmb/async_smb.c
+++ b/source3/libsmb/async_smb.c
@@ -106,7 +106,7 @@ static uint16_t cli_alloc_mid(struct cli_state *cli)
while (true) {
int i;
- result = cli->smb1.mid++;
+ result = cli->conn.smb1.mid++;
if ((result == 0) || (result == 0xffff)) {
continue;
}
diff --git a/source3/libsmb/clientgen.c b/source3/libsmb/clientgen.c
index 78211583d6..720a118559 100644
--- a/source3/libsmb/clientgen.c
+++ b/source3/libsmb/clientgen.c
@@ -304,6 +304,8 @@ struct cli_state *cli_state_create(TALLOC_CTX *mem_ctx,
cli->conn.smb1.capabilities = cli->conn.smb1.client.capabilities;
+ cli->conn.smb1.mid = 1;
+
cli->conn.outgoing = tevent_queue_create(cli, "cli_outgoing");
if (cli->conn.outgoing == NULL) {
goto error;
@@ -339,7 +341,6 @@ struct cli_state *cli_state_create(TALLOC_CTX *mem_ctx,
goto error;
}
- cli->smb1.mid = 1;
cli->smb1.pid = (uint16_t)sys_getpid();
cli->smb1.vc_num = cli->smb1.pid;
cli->smb1.tid = UINT16_MAX;