From dda54bcd7d6f6d674f197abd323e102fdf7e8dc3 Mon Sep 17 00:00:00 2001 From: Luke Leighton Date: Tue, 26 Sep 2000 05:44:42 +0000 Subject: added NEGNOWAIT. sent to secure@microsoft.com (This used to be commit b21179331802aace566671dcff6db22cdf4b3e81) --- source3/libsmb/cliconnect.c | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) (limited to 'source3/libsmb/cliconnect.c') diff --git a/source3/libsmb/cliconnect.c b/source3/libsmb/cliconnect.c index b18b1276c0..c4b491b056 100644 --- a/source3/libsmb/cliconnect.c +++ b/source3/libsmb/cliconnect.c @@ -331,6 +331,44 @@ BOOL cli_tdis(struct cli_state *cli) } +/**************************************************************************** +send a negprot command +****************************************************************************/ +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); + + p = smb_buf(cli->outbuf); + for (numprots=0; + prots[numprots].name && prots[numprots].prot<=cli->protocol; + numprots++) { + *p++ = 2; + pstrcpy(p,prots[numprots].name); + unix_to_dos(p,True); + p += strlen(p) + 1; + } + + CVAL(cli->outbuf,smb_com) = SMBnegprot; + cli_setup_packet(cli); + + CVAL(smb_buf(cli->outbuf),0) = 2; + + cli_send_smb(cli); +} + + /**************************************************************************** send a negprot command ****************************************************************************/ -- cgit