summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2001-02-20 12:45:50 +0000
committerAndrew Tridgell <tridge@samba.org>2001-02-20 12:45:50 +0000
commit8acf5e04482cb43734fbb786f8d363ee3bfff652 (patch)
tree3777683d2de87352854953cb0d9fcec91e15e0b7 /source3/lib
parent20b037b84951368cdac7fb65cd77aee0aeae9b37 (diff)
downloadsamba-8acf5e04482cb43734fbb786f8d363ee3bfff652.tar.gz
samba-8acf5e04482cb43734fbb786f8d363ee3bfff652.tar.bz2
samba-8acf5e04482cb43734fbb786f8d363ee3bfff652.zip
- neater setting of bcc
- converted cli_rename and cli_unlink (This used to be commit 0a8992e224b7a3d90d45b13d73fa8a6f155efa79)
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/util.c22
1 files changed, 16 insertions, 6 deletions
diff --git a/source3/lib/util.c b/source3/lib/util.c
index 2d922aab70..70513c068e 100644
--- a/source3/lib/util.c
+++ b/source3/lib/util.c
@@ -335,12 +335,22 @@ void smb_setlen(char *buf,int len)
********************************************************************/
int set_message(char *buf,int num_words,int num_bytes,BOOL zero)
{
- if (zero)
- memset(buf + smb_size,'\0',num_words*2 + num_bytes);
- CVAL(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);
+ if (zero)
+ memset(buf + smb_size,'\0',num_words*2 + num_bytes);
+ CVAL(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);
+}
+
+/*******************************************************************
+ setup only the byte count for a smb message
+********************************************************************/
+void set_message_bcc(char *buf,int num_bytes)
+{
+ int num_words = CVAL(buf,smb_wct);
+ SSVAL(buf,smb_vwv + num_words*SIZEOFWORD,num_bytes);
+ smb_setlen(buf,smb_size + num_words*2 + num_bytes - 4);
}
/*******************************************************************