mirror of
https://github.com/samba-team/samba.git
synced 2025-12-03 04:23:50 +03:00
s3:libsmb: move cli_set_message() to source3/libsmb/nmblib.c
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
committed by
Jeremy Allison
parent
03562cf128
commit
b1ebfec39e
@@ -28,21 +28,6 @@
|
||||
#include "../librpc/ndr/libndr.h"
|
||||
#include "../include/client.h"
|
||||
|
||||
/*******************************************************************
|
||||
Setup the word count and byte count for a client smb message.
|
||||
********************************************************************/
|
||||
|
||||
int cli_set_message(char *buf,int num_words,int num_bytes,bool zero)
|
||||
{
|
||||
if (zero && (num_words || num_bytes)) {
|
||||
memset(buf + smb_size,'\0',num_words*2 + num_bytes);
|
||||
}
|
||||
SCVAL(buf,smb_wct,num_words);
|
||||
SSVAL(buf,smb_vwv + num_words*SIZEOFWORD,num_bytes);
|
||||
smb_setlen(buf,smb_size + num_words*2 + num_bytes - 4);
|
||||
return (smb_size + num_words*2 + num_bytes);
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
Change the timeout (in milliseconds).
|
||||
****************************************************************************/
|
||||
|
||||
@@ -1448,3 +1448,18 @@ int name_len(unsigned char *s1, size_t buf_len)
|
||||
|
||||
return(len);
|
||||
}
|
||||
|
||||
/*******************************************************************
|
||||
Setup the word count and byte count for a client smb message.
|
||||
********************************************************************/
|
||||
|
||||
int cli_set_message(char *buf,int num_words,int num_bytes,bool zero)
|
||||
{
|
||||
if (zero && (num_words || num_bytes)) {
|
||||
memset(buf + smb_size,'\0',num_words*2 + num_bytes);
|
||||
}
|
||||
SCVAL(buf,smb_wct,num_words);
|
||||
SSVAL(buf,smb_vwv + num_words*SIZEOFWORD,num_bytes);
|
||||
smb_setlen(buf,smb_size + num_words*2 + num_bytes - 4);
|
||||
return (smb_size + num_words*2 + num_bytes);
|
||||
}
|
||||
|
||||
@@ -54,5 +54,6 @@ void sort_query_replies(char *data, int n, struct in_addr ip);
|
||||
char *name_mangle(TALLOC_CTX *mem_ctx, const char *In, char name_type);
|
||||
int name_extract(unsigned char *buf,size_t buf_len, unsigned int ofs, fstring name);
|
||||
int name_len(unsigned char *s1, size_t buf_len);
|
||||
int cli_set_message(char *buf,int num_words,int num_bytes,bool zero);
|
||||
|
||||
#endif /* _LIBSMB_NMBLIB_H_ */
|
||||
|
||||
@@ -187,7 +187,6 @@ bool cli_check_msdfs_proxy(TALLOC_CTX *ctx,
|
||||
|
||||
/* The following definitions come from libsmb/clientgen.c */
|
||||
|
||||
int cli_set_message(char *buf,int num_words,int num_bytes,bool zero);
|
||||
unsigned int cli_set_timeout(struct cli_state *cli, unsigned int timeout);
|
||||
bool cli_set_backup_intent(struct cli_state *cli, bool flag);
|
||||
extern struct GUID cli_state_client_guid;
|
||||
|
||||
Reference in New Issue
Block a user