diff options
author | Michael Adam <obnox@samba.org> | 2014-10-21 10:46:56 +0200 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2014-10-23 23:10:35 +0200 |
commit | 0fbd854204b29ee4315519f64311e0923b88876a (patch) | |
tree | e93b928459c012a2ee5ecfbad9c355d9a96a8a69 | |
parent | 95bf43bc6a0b6a4a47b8a556eee3b78446ea4123 (diff) | |
download | samba-0fbd854204b29ee4315519f64311e0923b88876a.tar.gz samba-0fbd854204b29ee4315519f64311e0923b88876a.tar.xz samba-0fbd854204b29ee4315519f64311e0923b88876a.zip |
s3:vfs:aio_pthread: use smbXsrv_connection for schedule_deferred_open_message_smb
This fixes an incompatible pointer warning which uncovered
a real bug. This caller was missed when converting the function.
This fix is only temporary, since we use fsp->sconn->client->connections
which is supposed to be the start of the list of transport connections
by a given client treated by this smbd process. Currently there is only
one such connection, but with multi-channel there might be more. So
we will need to improve this in the future.
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Thu Oct 23 23:10:35 CEST 2014 on sn-devel-104
-rw-r--r-- | source3/modules/vfs_aio_pthread.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/source3/modules/vfs_aio_pthread.c b/source3/modules/vfs_aio_pthread.c index d1922b57de..7e772971de 100644 --- a/source3/modules/vfs_aio_pthread.c +++ b/source3/modules/vfs_aio_pthread.c @@ -158,6 +158,7 @@ static void aio_open_handle_completion(struct tevent_context *event_ctx, struct aio_open_private_data *opd = NULL; int jobid = 0; int ret; + struct smbXsrv_connection *xconn; DEBUG(10, ("aio_open_handle_completion called with flags=%d\n", (int)flags)); @@ -191,8 +192,15 @@ static void aio_open_handle_completion(struct tevent_context *event_ctx, opd->in_progress = false; + /* + * TODO: In future we need a proper algorithm + * to find the correct connection for a fsp. + * For now we only have one connection, so this is correct... + */ + xconn = opd->sconn->client->connections; + /* Find outstanding event and reschedule. */ - if (!schedule_deferred_open_message_smb(opd->sconn, opd->mid)) { + if (!schedule_deferred_open_message_smb(xconn, opd->mid)) { /* * Outstanding event didn't exist or was * cancelled. Free up the fd and throw |