summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2011-09-13 14:38:38 +0200
committerStefan Metzmacher <metze@samba.org>2011-09-15 12:12:22 +0200
commit74a581afe55d54090d46aa60b6377b930f11a76f (patch)
tree2e2d82e19aa65ec543b55517aa50feed0f55af2d
parent17c6e0abae3e4011b526b50691c8f37ccde582d9 (diff)
downloadsamba-74a581afe55d54090d46aa60b6377b930f11a76f.tar.gz
samba-74a581afe55d54090d46aa60b6377b930f11a76f.tar.bz2
samba-74a581afe55d54090d46aa60b6377b930f11a76f.zip
s3:libsmb: move cli->protocol to cli->conn.protocol
metze
-rw-r--r--source3/include/client.h3
-rw-r--r--source3/libsmb/cliconnect.c8
-rw-r--r--source3/libsmb/clientgen.c2
3 files changed, 7 insertions, 6 deletions
diff --git a/source3/include/client.h b/source3/include/client.h
index 8a26e73c15..21ad457cb5 100644
--- a/source3/include/client.h
+++ b/source3/include/client.h
@@ -42,7 +42,6 @@ struct cli_state {
* A list of subsidiary connections for DFS.
*/
struct cli_state *prev, *next;
- enum protocol_types protocol;
int sec_mode;
int rap_error;
NTSTATUS raw_status; /* maybe via NT_STATUS_DOS() */
@@ -126,6 +125,8 @@ struct cli_state {
NTSTATUS (*dispatch_incoming)(struct cli_state *cli,
TALLOC_CTX *frame,
uint8_t *inbuf);
+
+ enum protocol_types protocol;
} conn;
struct {
diff --git a/source3/libsmb/cliconnect.c b/source3/libsmb/cliconnect.c
index 23518ea1b8..e2e7ffd449 100644
--- a/source3/libsmb/cliconnect.c
+++ b/source3/libsmb/cliconnect.c
@@ -2581,11 +2581,11 @@ struct tevent_req *cli_negprot_send(TALLOC_CTX *mem_ctx,
}
}
- tmp_protocol = cli->protocol;
- cli->protocol = state->max_protocol;
+ tmp_protocol = cli->conn.protocol;
+ cli->conn.protocol = state->max_protocol;
subreq = cli_smb_send(state, ev, cli, SMBnegprot, 0, 0, NULL,
talloc_get_size(bytes), bytes);
- cli->protocol = tmp_protocol;
+ cli->conn.protocol = tmp_protocol;
if (tevent_req_nomem(subreq, req)) {
return tevent_req_post(req, ev);
}
@@ -2756,7 +2756,7 @@ static void cli_negprot_done(struct tevent_req *subreq)
cli->capabilities |= both_capabilities & SMB_CAP_BOTH_MASK;
cli->capabilities |= server_capabilities & SMB_CAP_SERVER_MASK;
- cli->protocol = protocol;
+ cli->conn.protocol = protocol;
tevent_req_done(req);
}
diff --git a/source3/libsmb/clientgen.c b/source3/libsmb/clientgen.c
index 6d85239194..aaf18eb0ae 100644
--- a/source3/libsmb/clientgen.c
+++ b/source3/libsmb/clientgen.c
@@ -535,7 +535,7 @@ bool cli_set_case_sensitive(struct cli_state *cli, bool case_sensitive)
enum protocol_types cli_state_protocol(struct cli_state *cli)
{
- return cli->protocol;
+ return cli->conn.protocol;
}
uint32_t cli_state_capabilities(struct cli_state *cli)