aboutsummaryrefslogtreecommitdiffstats
path: root/pbx
diff options
context:
space:
mode:
Diffstat (limited to 'pbx')
-rw-r--r--pbx/pbx_spool.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/pbx/pbx_spool.c b/pbx/pbx_spool.c
index b295c22da..3f85c4c7b 100644
--- a/pbx/pbx_spool.c
+++ b/pbx/pbx_spool.c
@@ -465,7 +465,7 @@ static void *scan_thread(void *unused)
#if 0
printf("atime: %ld, mtime: %ld, ctime: %ld\n", st.st_atime, st.st_mtime, st.st_ctime);
printf("Ooh, something changed / timeout\n");
-#endif
+#endif
next = 0;
last = st.st_mtime;
@@ -489,8 +489,12 @@ static void *scan_thread(void *unused)
if (!next || (res < next)) {
next = res;
}
- } else if (res)
+ } else if (res) {
ast_log(LOG_WARNING, "Failed to scan service '%s'\n", fn);
+ } else if (!next) {
+ /* Expired entry: must recheck on the next go-around */
+ next = st.st_mtime;
+ }
} else {
/* Update "next" update if necessary */
if (!next || (st.st_mtime < next))