summaryrefslogtreecommitdiff
path: root/source3/smbd/aio.c
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2007-08-08 19:05:30 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:29:24 -0500
commit12d94f77f919851989da8dbcc12eb632258a2084 (patch)
tree1300412971e6d685d58b37eaffa21b1e4e24379b /source3/smbd/aio.c
parenta6810cb9a303d31dfedfb4bdc52f4d4df7e4eb90 (diff)
downloadsamba-12d94f77f919851989da8dbcc12eb632258a2084.tar.gz
samba-12d94f77f919851989da8dbcc12eb632258a2084.tar.bz2
samba-12d94f77f919851989da8dbcc12eb632258a2084.zip
r24279: Remove reply_prep_legacy from reply_write_and_X
(This used to be commit f18b7a9a282ebb5c31a89a601798f9a0db51867e)
Diffstat (limited to 'source3/smbd/aio.c')
-rw-r--r--source3/smbd/aio.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/source3/smbd/aio.c b/source3/smbd/aio.c
index f4c4aaec41..0ba857e2e5 100644
--- a/source3/smbd/aio.c
+++ b/source3/smbd/aio.c
@@ -284,11 +284,10 @@ BOOL schedule_aio_read_and_X(connection_struct *conn,
*****************************************************************************/
BOOL schedule_aio_write_and_X(connection_struct *conn,
- char *inbuf, char *outbuf,
- int length, int len_outbuf,
- files_struct *fsp, char *data,
- SMB_OFF_T startpos,
- size_t numtowrite)
+ struct smb_request *req,
+ files_struct *fsp, char *data,
+ SMB_OFF_T startpos,
+ size_t numtowrite)
{
struct aio_extra *aio_ex;
SMB_STRUCT_AIOCB *a;
@@ -306,7 +305,7 @@ BOOL schedule_aio_write_and_X(connection_struct *conn,
/* Only do this on non-chained and non-chaining reads not using the
* write cache. */
- if (chain_size !=0 || (CVAL(inbuf,smb_vwv0) != 0xFF)
+ if (chain_size !=0 || (CVAL(req->inbuf,smb_vwv0) != 0xFF)
|| (lp_write_cache_size(SNUM(conn)) != 0) ) {
return False;
}
@@ -320,23 +319,25 @@ BOOL schedule_aio_write_and_X(connection_struct *conn,
"(mid = %u)\n",
fsp->fsp_name, (double)startpos,
(unsigned int)numtowrite,
- (unsigned int)SVAL(inbuf,smb_mid) ));
+ (unsigned int)req->mid ));
return False;
}
- inbufsize = smb_len(inbuf) + 4;
- outbufsize = smb_len(outbuf) + 4;
+ inbufsize = smb_len(req->inbuf) + 4;
+ reply_outbuf(req, 6, 0);
+ outbufsize = smb_len(req->outbuf) + 4;
if (!(aio_ex = create_aio_ex_write(fsp, inbufsize, outbufsize,
- SVAL(inbuf,smb_mid)))) {
+ req->mid))) {
DEBUG(0,("schedule_aio_write_and_X: malloc fail.\n"));
return False;
}
/* Copy the SMB header already setup in outbuf. */
- memcpy(aio_ex->inbuf, inbuf, inbufsize);
+ memcpy(aio_ex->inbuf, req->inbuf, inbufsize);
/* Copy the SMB header already setup in outbuf. */
- memcpy(aio_ex->outbuf, outbuf, outbufsize);
+ memcpy(aio_ex->outbuf, req->outbuf, outbufsize);
+ TALLOC_FREE(req->outbuf);
SCVAL(aio_ex->outbuf,smb_vwv0,0xFF); /* Never a chained reply. */
a = &aio_ex->acb;
@@ -344,7 +345,7 @@ BOOL schedule_aio_write_and_X(connection_struct *conn,
/* Now set up the aio record for the write call. */
a->aio_fildes = fsp->fh->fd;
- a->aio_buf = aio_ex->inbuf + (PTR_DIFF(data, inbuf));
+ a->aio_buf = aio_ex->inbuf + (PTR_DIFF(data, req->inbuf));
a->aio_nbytes = numtowrite;
a->aio_offset = startpos;
a->aio_sigevent.sigev_notify = SIGEV_SIGNAL;
@@ -633,11 +634,10 @@ BOOL schedule_aio_read_and_X(connection_struct *conn,
}
BOOL schedule_aio_write_and_X(connection_struct *conn,
- char *inbuf, char *outbuf,
- int length, int len_outbuf,
- files_struct *fsp, char *data,
- SMB_OFF_T startpos,
- size_t numtowrite)
+ struct smb_request *req,
+ files_struct *fsp, char *data,
+ SMB_OFF_T startpos,
+ size_t numtowrite)
{
return False;
}