summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2007-02-01 13:36:02 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:17:38 -0500
commit240a3fd644bbc94e5872f699c9b90649b52b98a1 (patch)
tree159f64ebe6f471b11f2c54fca7f8f0166d72bd4f /source3/smbd
parent8b7233f19b4e294bf4174439b3acc427552dc4ee (diff)
downloadsamba-240a3fd644bbc94e5872f699c9b90649b52b98a1.tar.gz
samba-240a3fd644bbc94e5872f699c9b90649b52b98a1.tar.bz2
samba-240a3fd644bbc94e5872f699c9b90649b52b98a1.zip
r21108: Send sys_notify_watch through the VFS, FAM is next
(This used to be commit 603a96761391f36ae9a1c8777d3333ab5c02eb34)
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/notify.c10
-rw-r--r--source3/smbd/notify_internal.c7
-rw-r--r--source3/smbd/service.c2
3 files changed, 9 insertions, 10 deletions
diff --git a/source3/smbd/notify.c b/source3/smbd/notify.c
index 5c1143a28e..8719c83bba 100644
--- a/source3/smbd/notify.c
+++ b/source3/smbd/notify.c
@@ -400,7 +400,7 @@ char *notify_filter_string(TALLOC_CTX *mem_ctx, uint32 filter)
return result;
}
-struct sys_notify_context *sys_notify_context_create(struct share_params *scfg,
+struct sys_notify_context *sys_notify_context_create(connection_struct *conn,
TALLOC_CTX *mem_ctx,
struct event_context *ev)
{
@@ -412,6 +412,7 @@ struct sys_notify_context *sys_notify_context_create(struct share_params *scfg,
}
ctx->ev = ev;
+ ctx->conn = conn;
ctx->private_data = NULL;
return ctx;
}
@@ -423,10 +424,7 @@ NTSTATUS sys_notify_watch(struct sys_notify_context *ctx,
struct notify_event *ev),
void *private_data, void *handle)
{
-#ifdef HAVE_INOTIFY
- return inotify_watch(ctx, e, callback, private_data, handle);
-#else
- return NT_STATUS_OK;
-#endif
+ return SMB_VFS_NOTIFY_WATCH(ctx->conn, ctx, e, callback, private_data,
+ handle);
}
diff --git a/source3/smbd/notify_internal.c b/source3/smbd/notify_internal.c
index 6d77ba4df6..506ad15b71 100644
--- a/source3/smbd/notify_internal.c
+++ b/source3/smbd/notify_internal.c
@@ -73,11 +73,12 @@ static int notify_destructor(struct notify_context *notify)
struct notify_context *notify_init(TALLOC_CTX *mem_ctx, struct server_id server,
struct messaging_context *messaging_ctx,
struct event_context *ev,
- struct share_params *scfg)
+ connection_struct *conn)
{
struct notify_context *notify;
- if (!lp_parm_bool(scfg->service, "notify", "enable", True)) {
+ if (!lp_parm_bool(conn->params->service, "notify", "enable",
+ True)) {
return NULL;
}
@@ -107,7 +108,7 @@ struct notify_context *notify_init(TALLOC_CTX *mem_ctx, struct server_id server,
messaging_register(notify->messaging_ctx, notify,
MSG_PVFS_NOTIFY, notify_handler);
- notify->sys_notify_ctx = sys_notify_context_create(scfg, notify, ev);
+ notify->sys_notify_ctx = sys_notify_context_create(conn, notify, ev);
return notify;
}
diff --git a/source3/smbd/service.c b/source3/smbd/service.c
index 8dbcc2b5ab..c3bc89ec0d 100644
--- a/source3/smbd/service.c
+++ b/source3/smbd/service.c
@@ -950,7 +950,7 @@ static connection_struct *make_connection_snum(int snum, user_struct *vuser,
conn->notify_ctx = notify_init(conn->mem_ctx, server_id_self(),
smbd_messaging_context(),
smbd_event_context(),
- conn->params);
+ conn);
}
/* ROOT Activities: */