s3:libsmb: move cli->protocol to cli->conn.protocol
authorStefan Metzmacher <metze@samba.org>
Tue, 13 Sep 2011 12:38:38 +0000 (14:38 +0200)
committerStefan Metzmacher <metze@samba.org>
Thu, 15 Sep 2011 10:12:22 +0000 (12:12 +0200)
metze

source3/include/client.h
source3/libsmb/cliconnect.c
source3/libsmb/clientgen.c

index 8a26e73c155c03c7e17cd48a12f07afcc992af8a..21ad457cb543c5222c76285577a0fe823f06fca4 100644 (file)
@@ -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 {
index 23518ea1b80632666f0abb690fbe2f2554c48954..e2e7ffd44922d2f477eeb77e61d4f81226c3650b 100644 (file)
@@ -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);
 }
index 6d8523919400de0385a17fe45c2e24f519b74526..aaf18eb0ae6e7cbd9d5cfdd332ffe3dce9e92223 100644 (file)
@@ -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)