1
0
mirror of https://github.com/samba-team/samba.git synced 2025-08-03 04:22:09 +03:00

neater negprot code using the new cli_setup_bcc() call

(This used to be commit 5b17284265)
This commit is contained in:
Andrew Tridgell
2001-02-25 23:46:02 +00:00
parent 4d6e45e41b
commit 57467a9f60

View 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;