svn commit: samba r7413 - in trunk/source/smbd: .

jra at samba.org jra at samba.org
Wed Jun 8 21:01:04 GMT 2005


Author: jra
Date: 2005-06-08 21:01:04 +0000 (Wed, 08 Jun 2005)
New Revision: 7413

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=7413

Log:
Turns out we can't use set_message(outbut,12,nread,True) as this will
zero out what we just read. Instead use correct copy size to set up
header for reply.
Jeremy.

Modified:
   trunk/source/smbd/aio.c


Changeset:
Modified: trunk/source/smbd/aio.c
===================================================================
--- trunk/source/smbd/aio.c	2005-06-08 20:52:42 UTC (rev 7412)
+++ trunk/source/smbd/aio.c	2005-06-08 21:01:04 UTC (rev 7413)
@@ -224,7 +224,8 @@
 	}
 
 	/* Copy the SMB header already setup in outbuf. */
-	memcpy(aio_ex->outbuf, outbuf, smb_size);
+	memcpy(aio_ex->outbuf, outbuf, smb_buf(outbuf) - outbuf);
+	SCVAL(aio_ex->outbuf,smb_vwv0,0xFF); /* Never a chained reply. */
 
 	a = &aio_ex->acb;
 
@@ -292,7 +293,8 @@
 	SMB_ASSERT(aio_ex->inbuf == inbuf);
 
 	/* Copy the SMB header already setup in outbuf. */
-	memcpy(aio_ex->outbuf, outbuf, smb_size);
+	memcpy(aio_ex->outbuf, outbuf, smb_buf(outbuf) - outbuf);
+	SCVAL(aio_ex->outbuf,smb_vwv0,0xFF); /* Never a chained reply. */
 
 	a = &aio_ex->acb;
 
@@ -322,7 +324,6 @@
 	srv_defer_sign_response(aio_ex->mid);
 	outstanding_aio_calls++;
 	return True;
-	return False;
 }
 
 
@@ -361,7 +362,7 @@
 
 		outsize = (UNIXERROR(ERRDOS,ERRnoaccess));
 	} else {
-		outsize = set_message(outbuf,12,nread,True);
+		outsize = set_message(outbuf,12,nread,False);
 		SSVAL(outbuf,smb_vwv2,0xFFFF); /* Remaining - must be * -1. */
 		SSVAL(outbuf,smb_vwv5,nread);
 		SSVAL(outbuf,smb_vwv6,smb_offset(data,outbuf));



More information about the samba-cvs mailing list