aboutsummaryrefslogtreecommitdiff
path: root/src/watcher.c
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2012-12-24 08:50:18 +0200
committerSergey Poznyakoff <gray@gnu.org.ua>2012-12-24 08:50:18 +0200
commit633512c033c129a80a11a86ec85037fb2d2babf5 (patch)
tree7f1c0810110518f530237636dda7d9f2f39ba818 /src/watcher.c
parent0077bc419d34a0341f978fc0e2d5cba8d35d4b28 (diff)
downloadwydawca-633512c033c129a80a11a86ec85037fb2d2babf5.tar.gz
wydawca-633512c033c129a80a11a86ec85037fb2d2babf5.tar.bz2
Improve triplet queue handling.
Remove the expired and invalid triplets in the master process. * src/job.c (job_queue_runner): Take estimated minimal interval as an argument. Set timer even if no wake-up is scheduled. * src/net.c: Call triplet_sweep to sweep off expired triplets and estimate minimal timeout for job_queue_runner. * src/triplet.c: Link all registered triplets into a doubly- linked list ordered by the triplet age, in descending order. Use that list to estimate minimal timeout. (triplet_list): New variable. (triplet_timestamp, triplet_ttl) (triplet_list_unlink,triplet_list_insert_before) (triplet_list_ordered_insert): New static functions. (register_file): Insert triplet into the list. (triplet_expired_p): Take one argument. Obtain the ttl from the associated spool. Fix condition. (remove_triplet): Remove triplet from the list and symtab. (triplet_sweep): New function. (triplet_counter): Remove bad and expired triplets. (triplet_remove_file): Call remove_triplet. * src/wydawca.h (file_triplet) <next,prev>: New members. (triplet_sweep): New proto. (job_queue_runner): Change signature.
Diffstat (limited to 'src/watcher.c')
-rw-r--r--src/watcher.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/watcher.c b/src/watcher.c
index c52e3e6..1c67294 100644
--- a/src/watcher.c
+++ b/src/watcher.c
@@ -200,6 +200,7 @@ process_event (struct inotify_event *ep)
else
logmsg (LOG_NOTICE, "%s/%s: unexpected event %x",
dwp->spool->source_dir, ep->name, ep->mask);
+
}
static char buffer[4096];

Return to:

Send suggestions and report system problems to the System administrator.