From 8491ac0c7ddffea048e538a9d86ea6810baa424a Mon Sep 17 00:00:00 2001 From: "Andrew V. Samoilov" Date: Thu, 15 Sep 2005 12:07:17 +0000 Subject: [PATCH] * samba/lib/util.c (tab_depth): Remove. * samba/include/byteorder.h: Remove all macroces with tab_depth(). * vfs/samba/lib/util_sock.c: Comment out read_smb_length(), send_null_session_msg(), send_one_packet(), send_smd() and read_smb_length(). * vfs/samba/libsmb/nmblib.c: Comment out copy_nmb_packet(), copy_dgram_packet(), copy_packet() and nmb_name_equal(). --- vfs/ChangeLog | 10 +++++++++ vfs/samba/include/byteorder.h | 39 ----------------------------------- vfs/samba/lib/util.c | 8 ------- vfs/samba/lib/util_sock.c | 8 +++---- vfs/samba/libsmb/nmblib.c | 8 +++---- 5 files changed, 18 insertions(+), 55 deletions(-) diff --git a/vfs/ChangeLog b/vfs/ChangeLog index ad10ec7a4..ac9d4282a 100644 --- a/vfs/ChangeLog +++ b/vfs/ChangeLog @@ -1,3 +1,13 @@ +2005-09-15 Andrew V. Samoilov + + * samba/lib/util.c (tab_depth): Remove. + * samba/include/byteorder.h: Remove all macroces with tab_depth(). + * vfs/samba/lib/util_sock.c: Comment out read_smb_length(), + send_null_session_msg(), send_one_packet(), send_smd() + and read_smb_length(). + * vfs/samba/libsmb/nmblib.c: Comment out copy_nmb_packet(), + copy_dgram_packet(), copy_packet() and nmb_name_equal(). + 2005-09-07 Roland Illig * samba/*: Added many const qualifiers to properly fix the diff --git a/vfs/samba/include/byteorder.h b/vfs/samba/include/byteorder.h index 3362e9cb4..6a7ee90d1 100644 --- a/vfs/samba/include/byteorder.h +++ b/vfs/samba/include/byteorder.h @@ -223,43 +223,4 @@ it also defines lots of intermediate macros, just ignore those :-) #define RPSSVALS(buf,pos,val,len) SSMBMACRO(RSSVALS,buf,pos,val,len,2) #define RPSIVALS(buf,pos,val,len) SSMBMACRO(RSIVALS,buf,pos,val,len,4) -#define DBG_RW_PCVAL(charmode,string,depth,base,read,inbuf,outbuf,len) \ - { RW_PCVAL(read,inbuf,outbuf,len) \ - DEBUG(5,("%s%04x %s: ", \ - tab_depth(depth), base,string)); \ - if (charmode) print_asc(5, (unsigned char*)(outbuf), (len)); else \ - { int idx; for (idx = 0; idx < len; idx++) { DEBUG(5,("%02x ", (outbuf)[idx])); } } \ - DEBUG(5,("\n")); } - -#define DBG_RW_PSVAL(charmode,string,depth,base,read,big_endian,inbuf,outbuf,len) \ - { RW_PSVAL(read,big_endian,inbuf,outbuf,len) \ - DEBUG(5,("%s%04x %s: ", \ - tab_depth(depth), base,string)); \ - if (charmode) print_asc(5, (unsigned char*)(outbuf), 2*(len)); else \ - { int idx; for (idx = 0; idx < len; idx++) { DEBUG(5,("%04x ", (outbuf)[idx])); } } \ - DEBUG(5,("\n")); } - -#define DBG_RW_PIVAL(charmode,string,depth,base,read,big_endian,inbuf,outbuf,len) \ - { RW_PIVAL(read,big_endian,inbuf,outbuf,len) \ - DEBUG(5,("%s%04x %s: ", \ - tab_depth(depth), base,string)); \ - if (charmode) print_asc(5, (unsigned char*)(outbuf), 4*(len)); else \ - { int idx; for (idx = 0; idx < len; idx++) { DEBUG(5,("%08x ", (outbuf)[idx])); } } \ - DEBUG(5,("\n")); } - -#define DBG_RW_CVAL(string,depth,base,read,inbuf,outbuf) \ - { RW_CVAL(read,inbuf,outbuf,0) \ - DEBUG(5,("%s%04x %s: %02x\n", \ - tab_depth(depth), base, string, outbuf)); } - -#define DBG_RW_SVAL(string,depth,base,read,big_endian,inbuf,outbuf) \ - { RW_SVAL(read,big_endian,inbuf,outbuf,0) \ - DEBUG(5,("%s%04x %s: %04x\n", \ - tab_depth(depth), base, string, outbuf)); } - -#define DBG_RW_IVAL(string,depth,base,read,big_endian,inbuf,outbuf) \ - { RW_IVAL(read,big_endian,inbuf,outbuf,0) \ - DEBUG(5,("%s%04x %s: %08x\n", \ - tab_depth(depth), base, string, outbuf)); } - #endif /* _BYTEORDER_H */ diff --git a/vfs/samba/lib/util.c b/vfs/samba/lib/util.c index 5aaf884ad..1e61dc849 100644 --- a/vfs/samba/lib/util.c +++ b/vfs/samba/lib/util.c @@ -2809,14 +2809,6 @@ void dump_data(int level,char *buf1,int len) } } -char *tab_depth(int depth) -{ - static pstring spaces; - memset(spaces, ' ', depth * 4); - spaces[depth * 4] = 0; - return spaces; -} - /***************************************************************************** * Provide a checksum on a string * diff --git a/vfs/samba/lib/util_sock.c b/vfs/samba/lib/util_sock.c index 259158570..049ac5d5e 100644 --- a/vfs/samba/lib/util_sock.c +++ b/vfs/samba/lib/util_sock.c @@ -459,7 +459,7 @@ static ssize_t read_smb_length_return_keepalive(int fd,char *inbuf,unsigned int return(len); } - +#if 0 /**************************************************************************** read 4 bytes of a smb packet and return the smb length of the packet store the result in the buffer. This version of the function will @@ -486,7 +486,7 @@ ssize_t read_smb_length(int fd,char *inbuf,unsigned int timeout) return len; } - +#endif /* 0 */ /**************************************************************************** read an smb from a fd. Note that the buffer *MUST* be of size BUFFER_SIZE+SAFETY_MARGIN. @@ -564,7 +564,7 @@ BOOL client_receive_smb(int fd,char *buffer, unsigned int timeout) /**************************************************************************** send an null session message to a fd ****************************************************************************/ - +#if 0 BOOL send_null_session_msg(int fd) { ssize_t ret; @@ -656,7 +656,7 @@ BOOL send_one_packet(char *buf,int len,struct in_addr ip,int port,int type) close(out_fd); return(ret); } - +#endif /* 0 */ /**************************************************************************** open a socket of the specified type, port and address for incoming data diff --git a/vfs/samba/libsmb/nmblib.c b/vfs/samba/libsmb/nmblib.c index f09e293f1..d1b34bebb 100644 --- a/vfs/samba/libsmb/nmblib.c +++ b/vfs/samba/libsmb/nmblib.c @@ -503,7 +503,7 @@ static BOOL parse_nmb(char *inbuf,int length,struct nmb_packet *nmb) return(True); } - +#if 0 /******************************************************************* 'Copy constructor' for an nmb packet ******************************************************************/ @@ -613,7 +613,7 @@ struct packet_struct *copy_packet(struct packet_struct *packet) return copy_dgram_packet(packet); return NULL; } - +#endif /* 0 */ /******************************************************************* free up any resources associated with an nmb packet ******************************************************************/ @@ -788,14 +788,14 @@ void make_nmb_name( struct nmb_name *n, const char *name, int type ) /******************************************************************* Compare two nmb names ******************************************************************/ - +#if 0 BOOL nmb_name_equal(struct nmb_name *n1, struct nmb_name *n2) { return ((n1->name_type == n2->name_type) && strequal(n1->name ,n2->name ) && strequal(n1->scope,n2->scope)); } - +#endif /* 0 */ /******************************************************************* build a nmb packet ready for sending