diff options
author | Stefan Metzmacher <metze@samba.org> | 2011-10-20 09:44:02 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2011-10-21 08:43:00 +0200 |
commit | 6d2aaef787791fbcea9dcc6bca9e8f10d65dc746 (patch) | |
tree | 8b071a945483da5c21de32abb083d38d7362d26c | |
parent | e03b312b12785dc226c8f63e5d728e158fad38fd (diff) | |
download | samba-6d2aaef787791fbcea9dcc6bca9e8f10d65dc746.tar.gz samba-6d2aaef787791fbcea9dcc6bca9e8f10d65dc746.tar.bz2 samba-6d2aaef787791fbcea9dcc6bca9e8f10d65dc746.zip |
s3:include: make smb_setlen() a macro
metze
-rw-r--r-- | source3/include/proto.h | 1 | ||||
-rw-r--r-- | source3/include/smb_macros.h | 1 | ||||
-rw-r--r-- | source3/lib/util.c | 14 |
3 files changed, 1 insertions, 15 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h index fdeabefec2..3002fc33da 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -489,7 +489,6 @@ bool socket_exist(const char *fname); uint64_t get_file_size_stat(const SMB_STRUCT_STAT *sbuf); SMB_OFF_T get_file_size(char *file_name); void show_msg(const char *buf); -void smb_setlen(char *buf,int len); int set_message_bcc(char *buf,int num_bytes); ssize_t message_push_blob(uint8 **outbuf, DATA_BLOB blob); char *unix_clean_name(TALLOC_CTX *ctx, const char *s); diff --git a/source3/include/smb_macros.h b/source3/include/smb_macros.h index bed463d136..79d2f6833d 100644 --- a/source3/include/smb_macros.h +++ b/source3/include/smb_macros.h @@ -134,6 +134,7 @@ #define smb_len(buf) smb_len_nbt(buf) #define _smb_setlen(buf, len) _smb_setlen_nbt(buf, len) +#define smb_setlen(buf, len) smb_setlen_nbt(buf, len) #define smb_len_large(buf) smb_len_tcp(buf) #define _smb_setlen_large(buf, len) _smb_setlen_tcp(buf, len) diff --git a/source3/lib/util.c b/source3/lib/util.c index df82733bc1..8157c0ffd0 100644 --- a/source3/lib/util.c +++ b/source3/lib/util.c @@ -184,20 +184,6 @@ void show_msg(const char *buf) } /******************************************************************* - Set the length and marker of an smb packet. -********************************************************************/ - -void smb_setlen(char *buf,int len) -{ - _smb_setlen(buf,len); - - SCVAL(buf,4,0xFF); - SCVAL(buf,5,'S'); - SCVAL(buf,6,'M'); - SCVAL(buf,7,'B'); -} - -/******************************************************************* Setup only the byte count for a smb message. ********************************************************************/ |