aboutsummaryrefslogtreecommitdiff
path: root/src/watcher.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/watcher.c')
-rw-r--r--src/watcher.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/watcher.c b/src/watcher.c
index c18beab..1ba7c71 100644
--- a/src/watcher.c
+++ b/src/watcher.c
@@ -84,14 +84,14 @@ create_watcher(struct spool *sp, void *data)
return 0;
if (!sp->inotify_enable) {
- if (debug_level > 1)
+ if (wy_debug_level > 1)
logmsg(LOG_DEBUG,
"disabling inotify support for spool %s",
sp->tag);
return 0;
}
- if (debug_level > 1)
+ if (wy_debug_level > 1)
logmsg(LOG_DEBUG, "spool %s: creating watcher %s", sp->tag,
path);
dwp = malloc(sizeof(*dwp));
@@ -123,12 +123,12 @@ watcher_init()
int ifd, rc;
if (!inotify_enable) {
- if (debug_level > 1)
+ if (wy_debug_level > 1)
logmsg(LOG_DEBUG, "disabling inotify support");
return -1;
}
- if (debug_level > 1)
+ if (wy_debug_level > 1)
logmsg(LOG_DEBUG, "setting up inotify");
ifd = inotify_init();
if (ifd == -1) {
@@ -140,11 +140,11 @@ watcher_init()
if (rc)
exit(EX_OSERR);
if (!dirwatcher_list) {
- if (debug_level > 1)
+ if (wy_debug_level > 1)
logmsg(LOG_DEBUG, "inotify: nothing to watch");
close(ifd);
ifd = -1;
- } else if (debug_level > 1)
+ } else if (wy_debug_level > 1)
logmsg(LOG_DEBUG, "inotify initialized successfully");
return ifd;
@@ -174,17 +174,17 @@ process_event(struct inotify_event *ep)
else
logmsg(LOG_NOTICE, "unrecognized event %x", ep->mask);
} else if (ep->mask & IN_CREATE) {
- if (debug_level > 0)
+ if (wy_debug_level > 0)
logmsg(LOG_DEBUG, "%s/%s created",
dwp->spool->source_dir, ep->name);
} else if (ep->mask & (IN_DELETE | IN_MOVED_FROM)) {
- if (debug_level > 0)
+ if (wy_debug_level > 0)
logmsg(LOG_DEBUG, "%s/%s %s", dwp->spool->source_dir,
ep->name,
ep->mask & IN_DELETE ? "deleted" : "moved out");
triplet_remove_file(dwp->spool, ep->name);
} else if (ep->mask & (IN_CLOSE_WRITE | IN_MOVED_TO)) {
- if (debug_level > 0)
+ if (wy_debug_level > 0)
logmsg(LOG_DEBUG, "%s/%s written",
dwp->spool->source_dir, ep->name);
if (spool_add_new_file(dwp->spool, ep->name, 0, NULL) == 0

Return to:

Send suggestions and report system problems to the System administrator.