summaryrefslogtreecommitdiff
path: root/source3/modules/vfs_notify_fam.c
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2012-03-26 12:46:11 +0200
committerVolker Lendecke <vl@samba.org>2012-03-26 17:45:43 +0200
commitfa6f61e83565f49fb4e75248cffaa1ef31567d20 (patch)
tree0caed7c2a103a24db7e6d2e0578071beefbb69f2 /source3/modules/vfs_notify_fam.c
parentc3a506b64e248152212ab647048a47bd63039452 (diff)
downloadsamba-fa6f61e83565f49fb4e75248cffaa1ef31567d20.tar.gz
samba-fa6f61e83565f49fb4e75248cffaa1ef31567d20.tar.bz2
samba-fa6f61e83565f49fb4e75248cffaa1ef31567d20.zip
s3: Pass filters explicitly through vfs notify watch
This removes a dependency on "struct notify_entry" and makes the nature of the API more explicit. We depend upon the VFS module to mask out elements from e->filter and e->subdir_filter that it took over to handle. Autobuild-User: Volker Lendecke <vl@samba.org> Autobuild-Date: Mon Mar 26 17:45:44 CEST 2012 on sn-devel-104
Diffstat (limited to 'source3/modules/vfs_notify_fam.c')
-rw-r--r--source3/modules/vfs_notify_fam.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/source3/modules/vfs_notify_fam.c b/source3/modules/vfs_notify_fam.c
index 7ac6609c53..dcc843f6d8 100644
--- a/source3/modules/vfs_notify_fam.c
+++ b/source3/modules/vfs_notify_fam.c
@@ -221,8 +221,9 @@ static int fam_watch_context_destructor(struct fam_watch_context *ctx)
*/
static NTSTATUS fam_watch(vfs_handle_struct *vfs_handle,
struct sys_notify_context *ctx,
- struct notify_entry *e,
const char *path,
+ uint32_t *filter,
+ uint32_t *subdir_filter,
void (*callback)(struct sys_notify_context *ctx,
void *private_data,
struct notify_event *ev),
@@ -234,8 +235,8 @@ static NTSTATUS fam_watch(vfs_handle_struct *vfs_handle,
struct fam_watch_context *watch;
void **handle = (void **)handle_p;
- if ((e->filter & fam_mask) == 0) {
- DEBUG(10, ("filter = %u, ignoring in FAM\n", e->filter));
+ if ((*filter & fam_mask) == 0) {
+ DEBUG(10, ("filter = %u, ignoring in FAM\n", *filter));
return NT_STATUS_OK;
}
@@ -274,7 +275,7 @@ static NTSTATUS fam_watch(vfs_handle_struct *vfs_handle,
*/
watch->filter = fam_mask;
- e->filter &= ~fam_mask;
+ *filter &= ~fam_mask;
DLIST_ADD(fam_notify_list, watch);
talloc_set_destructor(watch, fam_watch_context_destructor);