diff options
Diffstat (limited to 'source3')
-rw-r--r-- | source3/include/client.h | 3 | ||||
-rw-r--r-- | source3/libsmb/async_smb.c | 2 | ||||
-rw-r--r-- | source3/libsmb/clientgen.c | 3 |
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; |