From 57467a9f6002eafdb7d1395a50089c53c37335d9 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 25 Feb 2001 23:46:02 +0000 Subject: neater negprot code using the new cli_setup_bcc() call (This used to be commit 5b1728426531785d37b4fac0684114f8a84dacb2) --- source3/libsmb/cliconnect.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'source3/libsmb/cliconnect.c') diff --git a/source3/libsmb/cliconnect.c b/source3/libsmb/cliconnect.c index d572c0f7d7..fd0218b908 100644 --- a/source3/libsmb/cliconnect.c +++ b/source3/libsmb/cliconnect.c @@ -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; -- cgit