summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2007-04-20 12:06:38 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:19:32 -0500
commite95c34dc6bbfd16f2f0a0cafa3c89ce0c20b8b06 (patch)
treed0a1c235313ba3b7725609738e9ac150fc92dc35
parent04a70aaf1ce24e35f58eb79abf20287c79b30444 (diff)
downloadsamba-e95c34dc6bbfd16f2f0a0cafa3c89ce0c20b8b06.tar.gz
samba-e95c34dc6bbfd16f2f0a0cafa3c89ce0c20b8b06.tar.bz2
samba-e95c34dc6bbfd16f2f0a0cafa3c89ce0c20b8b06.zip
r22411: Fix the build:
Prototype of create_aio_ex_read, set_message and definition of UNIXERROR have changed in r22389 and r22391? to require an additional "inbuf" argument. Some places in smbd/aio.c had not been adapted. This patch fixes the build. Michael (This used to be commit 9de1af6dc835fa12a75bae00935cd605f61217a3)
-rw-r--r--source3/smbd/aio.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/source3/smbd/aio.c b/source3/smbd/aio.c
index 0d4760a266..bee6ebc89a 100644
--- a/source3/smbd/aio.c
+++ b/source3/smbd/aio.c
@@ -242,7 +242,7 @@ BOOL schedule_aio_read_and_X(connection_struct *conn,
bufsize = PTR_DIFF(smb_buf(outbuf),outbuf) + smb_maxcnt;
if ((aio_ex = create_aio_ex_read(fsp, bufsize,
- SVAL(inbuf,smb_mid))) == NULL) {
+ SVAL(inbuf,smb_mid), inbuf)) == NULL) {
DEBUG(10,("schedule_aio_read_and_X: malloc fail.\n"));
return False;
}
@@ -382,6 +382,7 @@ static int handle_aio_read_complete(struct aio_extra *aio_ex)
int ret = 0;
int outsize;
char *outbuf = aio_ex->outbuf;
+ char *inbuf = aio_ex->inbuf;
char *data = smb_buf(outbuf);
ssize_t nread = SMB_VFS_AIO_RETURN(aio_ex->fsp,&aio_ex->acb);
@@ -405,7 +406,7 @@ static int handle_aio_read_complete(struct aio_extra *aio_ex)
outsize = (UNIXERROR(ERRDOS,ERRnoaccess));
ret = errno;
} else {
- outsize = set_message(outbuf,12,nread,False);
+ outsize = set_message(inbuf,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));
@@ -418,7 +419,7 @@ static int handle_aio_read_complete(struct aio_extra *aio_ex)
aio_ex->acb.aio_nbytes, (int)nread ) );
}
- smb_setlen(aio_ex->inbuf,outbuf,outsize - 4);
+ smb_setlen(inbuf,outbuf,outsize - 4);
show_msg(outbuf);
if (!send_smb(smbd_server_fd(),outbuf)) {
exit_server_cleanly("handle_aio_read_complete: send_smb "
@@ -443,6 +444,7 @@ static int handle_aio_write_complete(struct aio_extra *aio_ex)
int ret = 0;
files_struct *fsp = aio_ex->fsp;
char *outbuf = aio_ex->outbuf;
+ char *inbuf = aio_ex->inbuf;
ssize_t numtowrite = aio_ex->acb.aio_nbytes;
ssize_t nwritten = SMB_VFS_AIO_RETURN(fsp,&aio_ex->acb);