mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-13 00:04:53 +00:00
Merged revisions 160558 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r160558 | tilghman | 2008-12-03 11:34:34 -0600 (Wed, 03 Dec 2008) | 7 lines If an entry is added to the directory during a scan when another entry expires, then that new entry will not be processed promptly, but must wait for either a future entry to start or a current entry's retry to occur. If no other entries exist in the directory (other than the new entries) when a bunch expire, then the new entries must wait until another new entry is added to be processed. This was a rather weird race condition, really. Fixes AST-147. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@160559 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -480,8 +480,12 @@ static void *scan_thread(void *unused)
|
|||||||
if (!next || (res < next)) {
|
if (!next || (res < next)) {
|
||||||
next = res;
|
next = res;
|
||||||
}
|
}
|
||||||
} else if (res)
|
} else if (res) {
|
||||||
ast_log(LOG_WARNING, "Failed to scan service '%s'\n", fn);
|
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 {
|
} else {
|
||||||
/* Update "next" update if necessary */
|
/* Update "next" update if necessary */
|
||||||
if (!next || (st.st_mtime < next))
|
if (!next || (st.st_mtime < next))
|
||||||
|
Reference in New Issue
Block a user