diff options
author | Andrew Bartlett <abartlet@samba.org> | 2011-06-24 16:26:23 +1000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2011-06-24 16:26:23 +1000 |
commit | 6da26870e0ae5acd6ff49a30ec2f6886b44d095e (patch) | |
tree | 850c71039563c16a5d563c47e7ba2ab645baf198 /source3/smbd/aio.c | |
parent | 6925a799d04c6fa59dd2ddef1f5510f9bb7d17d1 (diff) | |
parent | 2610c05b5b95cc7036b3d6dfb894c6cfbdb68483 (diff) | |
download | samba-6da26870e0ae5acd6ff49a30ec2f6886b44d095e.tar.gz samba-6da26870e0ae5acd6ff49a30ec2f6886b44d095e.tar.bz2 samba-6da26870e0ae5acd6ff49a30ec2f6886b44d095e.zip |
Merge 2610c05b5b95cc7036b3d6dfb894c6cfbdb68483 as Samba-4.0alpha16
Diffstat (limited to 'source3/smbd/aio.c')
-rw-r--r-- | source3/smbd/aio.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/source3/smbd/aio.c b/source3/smbd/aio.c index 682d042806..db2926b4a4 100644 --- a/source3/smbd/aio.c +++ b/source3/smbd/aio.c @@ -21,6 +21,7 @@ #include "includes.h" #include "smbd/smbd.h" #include "smbd/globals.h" +#include "../lib/util/tevent_ntstatus.h" #if defined(WITH_AIO) @@ -80,8 +81,8 @@ static bool initialize_async_io_handler(void) } tried_signal_setup = true; - aio_signal_event = tevent_add_signal(smbd_event_context(), - smbd_event_context(), + aio_signal_event = tevent_add_signal(server_event_context(), + server_event_context(), RT_SIGNAL_AIO, SA_SIGINFO, smbd_aio_signal_handler, NULL); @@ -115,7 +116,7 @@ static struct aio_extra *create_aio_extra(TALLOC_CTX *mem_ctx, files_struct *fsp, size_t buflen) { - struct aio_extra *aio_ex = TALLOC_ZERO_P(mem_ctx, struct aio_extra); + struct aio_extra *aio_ex = talloc_zero(mem_ctx, struct aio_extra); if (!aio_ex) { return NULL; @@ -250,7 +251,7 @@ NTSTATUS schedule_aio_read_and_X(connection_struct *conn, NTSTATUS schedule_aio_write_and_X(connection_struct *conn, struct smb_request *smbreq, - files_struct *fsp, char *data, + files_struct *fsp, const char *data, SMB_OFF_T startpos, size_t numtowrite) { @@ -328,7 +329,7 @@ NTSTATUS 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 = data; + a->aio_buf = discard_const_p(char, data); a->aio_nbytes = numtowrite; a->aio_offset = startpos; a->aio_sigevent.sigev_notify = SIGEV_SIGNAL; @@ -1029,7 +1030,7 @@ NTSTATUS schedule_aio_read_and_X(connection_struct *conn, NTSTATUS schedule_aio_write_and_X(connection_struct *conn, struct smb_request *smbreq, - files_struct *fsp, char *data, + files_struct *fsp, const char *data, SMB_OFF_T startpos, size_t numtowrite) { |