summaryrefslogtreecommitdiff
path: root/source4/ntvfs/posix/pvfs_wait.c
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-02-25 12:58:09 +0100
committerJelmer Vernooij <jelmer@samba.org>2008-02-25 12:58:09 +0100
commit584c4a518f4d18452b6515db132e4f75fba733a1 (patch)
treebbe367f36f092f233d7aefb61d75d5d1e1e85031 /source4/ntvfs/posix/pvfs_wait.c
parent03ab8f9d79f2a06b357b2f5d392ea8b5be263c5e (diff)
parent71943b209b181e1e4a65ab477b83780add7051ae (diff)
downloadsamba-584c4a518f4d18452b6515db132e4f75fba733a1.tar.gz
samba-584c4a518f4d18452b6515db132e4f75fba733a1.tar.bz2
samba-584c4a518f4d18452b6515db132e4f75fba733a1.zip
Merge branch 'v4-0-test' of ssh://git.samba.org/data/git/samba into v4-0-gmake3
Conflicts: source/build/smb_build/header.pm source/build/smb_build/makefile.pm source/lib/ldb/include/ldb_private.h (This used to be commit 1a646af0647f021d99473a8991c35e616a423ea6)
Diffstat (limited to 'source4/ntvfs/posix/pvfs_wait.c')
-rw-r--r--source4/ntvfs/posix/pvfs_wait.c37
1 files changed, 21 insertions, 16 deletions
diff --git a/source4/ntvfs/posix/pvfs_wait.c b/source4/ntvfs/posix/pvfs_wait.c
index 989985a033..291250befd 100644
--- a/source4/ntvfs/posix/pvfs_wait.c
+++ b/source4/ntvfs/posix/pvfs_wait.c
@@ -31,7 +31,7 @@ struct pvfs_wait {
struct pvfs_wait *next, *prev;
struct pvfs_state *pvfs;
void (*handler)(void *, enum pvfs_wait_notice);
- void *private;
+ void *private_data;
int msg_type;
struct messaging_context *msg_ctx;
struct event_context *ev;
@@ -45,20 +45,23 @@ struct pvfs_wait {
previous ntvfs handlers in the chain (such as security context)
*/
NTSTATUS pvfs_async_setup(struct ntvfs_module_context *ntvfs,
- struct ntvfs_request *req, void *private)
+ struct ntvfs_request *req, void *private_data)
{
- struct pvfs_wait *pwait = private;
- pwait->handler(pwait->private, pwait->reason);
+ struct pvfs_wait *pwait = talloc_get_type(private_data,
+ struct pvfs_wait);
+ pwait->handler(pwait->private_data, pwait->reason);
return NT_STATUS_OK;
}
/*
receive a completion message for a wait
*/
-static void pvfs_wait_dispatch(struct messaging_context *msg, void *private, uint32_t msg_type,
+static void pvfs_wait_dispatch(struct messaging_context *msg,
+ void *private_data, uint32_t msg_type,
struct server_id src, DATA_BLOB *data)
{
- struct pvfs_wait *pwait = private;
+ struct pvfs_wait *pwait = talloc_get_type(private_data,
+ struct pvfs_wait);
struct ntvfs_request *req;
void *p = NULL;
@@ -70,7 +73,7 @@ static void pvfs_wait_dispatch(struct messaging_context *msg, void *private, uin
pp = (void **)data->data;
p = *pp;
}
- if (p == NULL || p != pwait->private) {
+ if (p == NULL || p != pwait->private_data) {
return;
}
@@ -91,9 +94,11 @@ static void pvfs_wait_dispatch(struct messaging_context *msg, void *private, uin
receive a timeout on a message wait
*/
static void pvfs_wait_timeout(struct event_context *ev,
- struct timed_event *te, struct timeval t, void *private)
+ struct timed_event *te, struct timeval t,
+ void *private_data)
{
- struct pvfs_wait *pwait = talloc_get_type(private, struct pvfs_wait);
+ struct pvfs_wait *pwait = talloc_get_type(private_data,
+ struct pvfs_wait);
struct ntvfs_request *req = pwait->req;
pwait->reason = PVFS_WAIT_TIMEOUT;
@@ -126,12 +131,12 @@ static int pvfs_wait_destructor(struct pvfs_wait *pwait)
if msg_type == -1 then no message is registered, and it is assumed
that the caller handles any messaging setup needed
*/
-void *pvfs_wait_message(struct pvfs_state *pvfs,
- struct ntvfs_request *req,
- int msg_type,
- struct timeval end_time,
- void (*fn)(void *, enum pvfs_wait_notice),
- void *private)
+struct pvfs_wait *pvfs_wait_message(struct pvfs_state *pvfs,
+ struct ntvfs_request *req,
+ int msg_type,
+ struct timeval end_time,
+ void (*fn)(void *, enum pvfs_wait_notice),
+ void *private_data)
{
struct pvfs_wait *pwait;
@@ -140,7 +145,7 @@ void *pvfs_wait_message(struct pvfs_state *pvfs,
return NULL;
}
- pwait->private = private;
+ pwait->private_data = private_data;
pwait->handler = fn;
pwait->msg_ctx = pvfs->ntvfs->ctx->msg_ctx;
pwait->ev = pvfs->ntvfs->ctx->event_ctx;