From b02d27ae056b08372861de4980fca1e03cb8d091 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Tue, 13 Sep 2011 15:07:29 +0200 Subject: s3:libsmb: move cli->smb1.mid to cli->conn.smb1.mid metze --- source3/libsmb/async_smb.c | 2 +- source3/libsmb/clientgen.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'source3/libsmb') 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; -- cgit