diff options
author | Stefan Metzmacher <metze@samba.org> | 2006-07-12 14:25:50 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:10:06 -0500 |
commit | a8958391e8fd9ddd996d2d3aff7ddeed3243fc1f (patch) | |
tree | 617c2420c90d475b05bb3b3894feb2914fbed393 /source4/ntvfs/posix | |
parent | e6b29409a29bdf99c45b2c0aefecb321904f2fd3 (diff) | |
download | samba-a8958391e8fd9ddd996d2d3aff7ddeed3243fc1f.tar.gz samba-a8958391e8fd9ddd996d2d3aff7ddeed3243fc1f.tar.bz2 samba-a8958391e8fd9ddd996d2d3aff7ddeed3243fc1f.zip |
r16980: - make struct smb_notify a union and add levels RAW_NOTIFY_NTTRANS,RAW_NOTIFY_SMB2
- parse SMB2 Notify reponse
metze
(This used to be commit de50e0ccddfad16ad7b254770f4c52c1abe707b9)
Diffstat (limited to 'source4/ntvfs/posix')
-rw-r--r-- | source4/ntvfs/posix/pvfs_notify.c | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/source4/ntvfs/posix/pvfs_notify.c b/source4/ntvfs/posix/pvfs_notify.c index 64aeac0696..ffbe1f8bb7 100644 --- a/source4/ntvfs/posix/pvfs_notify.c +++ b/source4/ntvfs/posix/pvfs_notify.c @@ -40,7 +40,7 @@ struct pvfs_notify_buffer { struct notify_pending { struct notify_pending *next, *prev; struct ntvfs_request *req; - struct smb_notify *info; + union smb_notify *info; } *pending; }; @@ -64,7 +64,7 @@ static void pvfs_notify_send(struct pvfs_notify_buffer *notify_buffer, { struct notify_pending *pending = notify_buffer->pending; struct ntvfs_request *req; - struct smb_notify *info; + union smb_notify *info; if (notify_buffer->current_buffer_size > notify_buffer->max_buffer_size && notify_buffer->num_changes != 0) { @@ -87,15 +87,15 @@ static void pvfs_notify_send(struct pvfs_notify_buffer *notify_buffer, req = pending->req; info = pending->info; - info->out.num_changes = notify_buffer->num_changes; - info->out.changes = talloc_steal(req, notify_buffer->changes); + info->nttrans.out.num_changes = notify_buffer->num_changes; + info->nttrans.out.changes = talloc_steal(req, notify_buffer->changes); notify_buffer->num_changes = 0; notify_buffer->changes = NULL; notify_buffer->current_buffer_size = 0; talloc_free(pending); - if (info->out.num_changes != 0) { + if (info->nttrans.out.num_changes != 0) { status = NT_STATUS_OK; } @@ -219,7 +219,7 @@ static void pvfs_notify_end(void *private, enum pvfs_wait_notice reason) event buffer is non-empty */ NTSTATUS pvfs_notify(struct ntvfs_module_context *ntvfs, struct ntvfs_request *req, - struct smb_notify *info) + union smb_notify *info) { struct pvfs_state *pvfs = talloc_get_type(ntvfs->private_data, struct pvfs_state); @@ -227,7 +227,11 @@ NTSTATUS pvfs_notify(struct ntvfs_module_context *ntvfs, NTSTATUS status; struct notify_pending *pending; - f = pvfs_find_fd(pvfs, req, info->in.file.ntvfs); + if (info->nttrans.level != RAW_NOTIFY_NTTRANS) { + return NT_STATUS_NOT_IMPLEMENTED; + } + + f = pvfs_find_fd(pvfs, req, info->nttrans.in.file.ntvfs); if (!f) { return NT_STATUS_INVALID_HANDLE; } @@ -246,15 +250,15 @@ NTSTATUS pvfs_notify(struct ntvfs_module_context *ntvfs, create one */ if (f->notify_buffer == NULL) { status = pvfs_notify_setup(pvfs, f, - info->in.buffer_size, - info->in.completion_filter, - info->in.recursive); + info->nttrans.in.buffer_size, + info->nttrans.in.completion_filter, + info->nttrans.in.recursive); NT_STATUS_NOT_OK_RETURN(status); } /* we update the max_buffer_size on each call, but we do not update the recursive flag or filter */ - f->notify_buffer->max_buffer_size = info->in.buffer_size; + f->notify_buffer->max_buffer_size = info->nttrans.in.buffer_size; pending = talloc(f->notify_buffer, struct notify_pending); NT_STATUS_HAVE_NO_MEMORY(pending); |