neater negprot code using the new cli_setup_bcc() call
authorAndrew Tridgell <tridge@samba.org>
Sun, 25 Feb 2001 23:46:02 +0000 (23:46 +0000)
committerAndrew Tridgell <tridge@samba.org>
Sun, 25 Feb 2001 23:46:02 +0000 (23:46 +0000)
(This used to be commit 5b1728426531785d37b4fac0684114f8a84dacb2)

source3/libsmb/cliconnect.c

index d572c0f7d7dbd908c1d862a67dcfd4b6b002375e..fd0218b9086b2b6197a43bd895cbb00a1779ed60 100644 (file)
@@ -339,17 +339,11 @@ void cli_negprot_send(struct cli_state *cli)
 {
        char *p;
        int numprots;
-       int plength;
 
        memset(cli->outbuf,'\0',smb_size);
 
        /* setup the protocol strings */
-       for (plength=0,numprots=0;
-            prots[numprots].name && prots[numprots].prot<=cli->protocol;
-            numprots++)
-               plength += strlen(prots[numprots].name)+2;
-    
-       set_message(cli->outbuf,0,plength,True);
+       set_message(cli->outbuf,0,0,True);
 
        p = smb_buf(cli->outbuf);
        for (numprots=0;
@@ -362,6 +356,7 @@ void cli_negprot_send(struct cli_state *cli)
        }
 
        CVAL(cli->outbuf,smb_com) = SMBnegprot;
+       cli_setup_bcc(cli, p);
        cli_setup_packet(cli);
 
        CVAL(smb_buf(cli->outbuf),0) = 2;