summaryrefslogtreecommitdiff
path: root/source4/ntvfs/common
diff options
context:
space:
mode:
Diffstat (limited to 'source4/ntvfs/common')
-rw-r--r--source4/ntvfs/common/config.mk2
-rw-r--r--source4/ntvfs/common/notify.c10
2 files changed, 8 insertions, 4 deletions
diff --git a/source4/ntvfs/common/config.mk b/source4/ntvfs/common/config.mk
index feb3613f78..c16cc09dfe 100644
--- a/source4/ntvfs/common/config.mk
+++ b/source4/ntvfs/common/config.mk
@@ -7,6 +7,6 @@ OBJ_FILES = \
brlock.o \
opendb.o \
notify.o
-PUBLIC_DEPENDENCIES = NDR_OPENDB NDR_NOTIFY sys_notify
+PUBLIC_DEPENDENCIES = NDR_OPENDB NDR_NOTIFY sys_notify share
# End LIBRARY ntvfs_common
################################################
diff --git a/source4/ntvfs/common/notify.c b/source4/ntvfs/common/notify.c
index 222bd7a927..dbf404d9e6 100644
--- a/source4/ntvfs/common/notify.c
+++ b/source4/ntvfs/common/notify.c
@@ -56,6 +56,9 @@ struct notify_list {
#define NOTIFY_KEY "notify array"
+#define NOTIFY_ENABLE "notify:enable"
+#define NOTIFY_ENABLE_DEFAULT True
+
static NTSTATUS notify_remove_all(struct notify_context *notify);
static void notify_handler(struct messaging_context *msg_ctx, void *private,
uint32_t msg_type, uint32_t server_id, DATA_BLOB *data);
@@ -77,12 +80,13 @@ static int notify_destructor(struct notify_context *notify)
*/
struct notify_context *notify_init(TALLOC_CTX *mem_ctx, uint32_t server,
struct messaging_context *messaging_ctx,
- struct event_context *ev, int snum)
+ struct event_context *ev,
+ struct share_config *scfg)
{
char *path;
struct notify_context *notify;
- if (lp_parm_bool(snum, "notify", "enable", True) != True) {
+ if (share_bool_option(scfg, NOTIFY_ENABLE, NOTIFY_ENABLE_DEFAULT) != True) {
return NULL;
}
@@ -114,7 +118,7 @@ struct notify_context *notify_init(TALLOC_CTX *mem_ctx, uint32_t server,
messaging_register(notify->messaging_ctx, notify,
MSG_PVFS_NOTIFY, notify_handler);
- notify->sys_notify_ctx = sys_notify_context_create(snum, notify, ev);
+ notify->sys_notify_ctx = sys_notify_context_create(scfg, notify, ev);
return notify;
}