s4: Fix include path to work with tevent
[samba.git] / source4 / ntvfs / sysdep / sys_notify.c
index 9770323c3fa0ec343b9aed4f72098ede9b9cb1a1..117d16d20a689a2d0df562c8590540394842e06d 100644 (file)
@@ -25,8 +25,8 @@
 #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"
 
 /* list of registered backends */
@@ -71,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;