From 23af0743267d250a90af77c3bbce4d5fd0cdcc00 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 17 Sep 2001 04:23:48 +0000 Subject: fixed ctemp in server and client. It turns out that ctemp on NT is completely broken, and it's pointless to emulate their brokenness completely in this case, but at least this makes us use approximately the same packet format. The spec is complelet wrong in this case (This used to be commit 2d507ec669def6d49304559e53d6c14af9b290a9) --- source3/lib/util.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'source3/lib') diff --git a/source3/lib/util.c b/source3/lib/util.c index 3d2de63f38..0eaf7c01fc 100644 --- a/source3/lib/util.c +++ b/source3/lib/util.c @@ -335,20 +335,21 @@ int set_message(char *buf,int num_words,int num_bytes,BOOL zero) /******************************************************************* setup only the byte count for a smb message ********************************************************************/ -void set_message_bcc(char *buf,int num_bytes) +int 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); + return (smb_size + num_words*2 + num_bytes); } /******************************************************************* setup only the byte count for a smb message, using the end of the message as a marker ********************************************************************/ -void set_message_end(void *outbuf,void *end_ptr) +int set_message_end(void *outbuf,void *end_ptr) { - set_message_bcc((char *)outbuf,PTR_DIFF(end_ptr,smb_buf((char *)outbuf))); + return set_message_bcc((char *)outbuf,PTR_DIFF(end_ptr,smb_buf((char *)outbuf))); } /******************************************************************* -- cgit