From 0fbd854204b29ee4315519f64311e0923b88876a Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Tue, 21 Oct 2014 10:46:56 +0200 Subject: 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 Reviewed-by: Volker Lendecke Autobuild-User(master): Volker Lendecke Autobuild-Date(master): Thu Oct 23 23:10:35 CEST 2014 on sn-devel-104 --- source3/modules/vfs_aio_pthread.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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 -- cgit