diff options
author | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-12-03 17:01:47 +0000 |
---|---|---|
committer | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-12-03 17:01:47 +0000 |
commit | d8d0dacb2380c3b5210e86f57c26e4964650e819 (patch) | |
tree | 76d86ecb621d3064cce261705cf231c056322a60 /pbx | |
parent | 0cfa1fc820bea91f1a5cc3723eb0c2b3aa8fda83 (diff) |
Merged revisions 160552 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
................
r160552 | tilghman | 2008-12-03 11:01:03 -0600 (Wed, 03 Dec 2008) | 11 lines
Merged revisions 160551 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r160551 | tilghman | 2008-12-03 10:58:34 -0600 (Wed, 03 Dec 2008) | 4 lines
Don't start scanning the directory until all modules are loaded, because some
required modules (channels, apps, functions) may not yet be in memory yet.
Fixes AST-149.
........
................
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@160553 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'pbx')
-rw-r--r-- | pbx/pbx_spool.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/pbx/pbx_spool.c b/pbx/pbx_spool.c index f265d7569..b295c22da 100644 --- a/pbx/pbx_spool.c +++ b/pbx/pbx_spool.c @@ -40,6 +40,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include "asterisk/pbx.h" #include "asterisk/module.h" #include "asterisk/utils.h" +#include "asterisk/options.h" /* * pbx_spool is similar in spirit to qcall, but with substantially enhanced functionality... @@ -441,10 +442,15 @@ static void *scan_thread(void *unused) char fn[256]; int res; time_t last = 0, next = 0, now; + struct timespec ts = { .tv_sec = 1 }; + + while (!ast_fully_booted) { + nanosleep(&ts, NULL); + } for(;;) { /* Wait a sec */ - sleep(1); + nanosleep(&ts, NULL); time(&now); if (stat(qdir, &st)) { |