diff options
author | Simo Sorce <idra@samba.org> | 2006-07-23 18:43:07 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:10:18 -0500 |
commit | 9c66f601f1520a99b9236c32bc9f03a33bd4b2aa (patch) | |
tree | bba8797304b7db98aa205c3cb04344072be00030 /source4/ntvfs/common | |
parent | 2dc38416b65177aca94b4de3c9cfcb5c8edb0df2 (diff) | |
download | samba-9c66f601f1520a99b9236c32bc9f03a33bd4b2aa.tar.gz samba-9c66f601f1520a99b9236c32bc9f03a33bd4b2aa.tar.bz2 samba-9c66f601f1520a99b9236c32bc9f03a33bd4b2aa.zip |
r17206: Add a modular API for share configuration.
Commit the classic backwards compatible module which is the default one
(This used to be commit a89cc346b9296cb49929898d257a064a6c2bae86)
Diffstat (limited to 'source4/ntvfs/common')
-rw-r--r-- | source4/ntvfs/common/config.mk | 2 | ||||
-rw-r--r-- | source4/ntvfs/common/notify.c | 10 |
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; } |