s4: Fix include path to work with tevent
[samba.git] / source4 / ntvfs / sysdep / sys_notify.c
index eb5cc3793f65bfd56a54e4c162b43e7d625f260c..117d16d20a689a2d0df562c8590540394842e06d 100644 (file)
 #include "includes.h"
 #include "system/filesys.h"
 #include "ntvfs/sysdep/sys_notify.h"
-#include "lib/events/events.h"
-#include "lib/util/dlinklist.h"
+#include "../lib/tevent/tevent.h"
+#include "../lib/util/dlinklist.h"
 #include "param/param.h"
-#include "build.h"
 
 /* list of registered backends */
 static struct sys_notify_backend *backends;
@@ -52,7 +51,7 @@ _PUBLIC_ struct sys_notify_context *sys_notify_context_create(struct share_confi
        }
 
        if (ev == NULL) {
-               ev = event_context_find(mem_ctx);
+               return NULL;
        }
 
        ctx = talloc_zero(mem_ctx, struct sys_notify_context);
@@ -72,6 +71,17 @@ _PUBLIC_ struct sys_notify_context *sys_notify_context_create(struct share_confi
        }
 
        for (i=0;i<num_backends;i++) {
+               char *enable_opt_name;
+               bool enabled;
+               
+               enable_opt_name = talloc_asprintf(mem_ctx, "notify:%s", 
+                                                                                 backends[i].name);
+               enabled = share_bool_option(scfg, enable_opt_name, true);
+               talloc_free(enable_opt_name);
+
+               if (!enabled) 
+                       continue;
+
                if (strcasecmp(backends[i].name, bname) == 0) {
                        bname = backends[i].name;
                        break;