r26224: Remove another use of global_loadparm.
authorJelmer Vernooij <jelmer@samba.org>
Sun, 2 Dec 2007 15:20:32 +0000 (16:20 +0100)
committerStefan Metzmacher <metze@samba.org>
Fri, 21 Dec 2007 04:47:00 +0000 (05:47 +0100)
source/auth/auth_server.c
source/client/smbmount.c
source/libcli/cliconnect.c

index b4fbeea..36637ed 100644 (file)
@@ -92,7 +92,7 @@ static struct smbcli_state *server_cryptkey(TALLOC_CTX *mem_ctx)
        
        DEBUG(3,("got session\n"));
 
-       if (!smbcli_negprot(cli)) {
+       if (!smbcli_negprot(cli, lp_cli_maxprotocol(global_loadparm))) {
                DEBUG(1,("%s rejected the negprot\n",desthost));
                release_server_mutex();
                talloc_free(cli);
index 8a10697..1a1371e 100644 (file)
@@ -181,7 +181,7 @@ static struct smbcli_state *do_connection(char *the_service)
 
        DEBUG(4,("%d: session request ok\n", sys_getpid()));
 
-       if (!smbcli_negprot(c)) {
+       if (!smbcli_negprot(c, lp_cli_maxprotocol(global_loadparm))) {
                DEBUG(0,("%d: protocol negotiation failed\n", sys_getpid()));
                talloc_free(c);
                return NULL;
index a56100f..d806653 100644 (file)
@@ -55,10 +55,9 @@ bool smbcli_transport_establish(struct smbcli_state *cli,
 }
 
 /* wrapper around smb_raw_negotiate() */
-NTSTATUS smbcli_negprot(struct smbcli_state *cli)
+NTSTATUS smbcli_negprot(struct smbcli_state *cli, int maxprotocol)
 {
-       return smb_raw_negotiate(cli->transport, 
-                                lp_cli_maxprotocol(global_loadparm));
+       return smb_raw_negotiate(cli->transport, maxprotocol);
 }
 
 /* wrapper around smb_raw_sesssetup() */