Author: metze Date: 2006-07-08 07:39:06 +0000 (Sat, 08 Jul 2006) New Revision: 16869
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=16869 Log: - if we know the blob length, we can preallocated the memory and avoid a realloc in smb2_push_* - don't overwrite the first data byte metze Modified: branches/SAMBA_4_0/source/smb_server/smb2/fileio.c Changeset: Modified: branches/SAMBA_4_0/source/smb_server/smb2/fileio.c =================================================================== --- branches/SAMBA_4_0/source/smb_server/smb2/fileio.c 2006-07-08 07:37:05 UTC (rev 16868) +++ branches/SAMBA_4_0/source/smb_server/smb2/fileio.c 2006-07-08 07:39:06 UTC (rev 16869) @@ -154,11 +154,10 @@ union smb_read *io; SMB2SRV_CHECK_ASYNC_STATUS(io, union smb_read); - SMB2SRV_CHECK(smb2srv_setup_reply(req, 0x10, True, 0)); + SMB2SRV_CHECK(smb2srv_setup_reply(req, 0x10, True, io->smb2.out.data.length)); SMB2SRV_CHECK(smb2_push_o16s32_blob(&req->out, 0x02, io->smb2.out.data)); SBVAL(req->out.body, 0x08, io->smb2.out.unknown1); - SCVAL(req->out.body, 0x10, 0); smb2srv_send_reply(req); }
