Branch: Tag:


2015-09-18 14:44:05 by Henrik Grubbström (Grubba) <>

Filesystem.Monitor: Survive an empty monitor_queue in check().

Preparation for only having polled monitors in the monitor_queue.

Currently monitors and monitor_queue always have the same size,
but with filesystem event systems there's no need to poll the
event monitored files by hand, so leave the monitor queue for
the paths that the event system doesn't support.

1159:    int ret = max_dir_check_interval;    int cnt;    int t = time(); -  if (sizeof(monitors)) { +  if (sizeof(monitor_queue)) {    Monitor m;    while ((m = monitor_queue->peek()) && (m->next_poll <= t)) {    cnt += check_monitor(m);