[asterisk-commits] tilghman: branch 1.4 r160551 - /branches/1.4/pbx/pbx_spool.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Dec 3 10:58:35 CST 2008


Author: tilghman
Date: Wed Dec  3 10:58:34 2008
New Revision: 160551

URL: http://svn.digium.com/view/asterisk?view=rev&rev=160551
Log:
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.

Modified:
    branches/1.4/pbx/pbx_spool.c

Modified: branches/1.4/pbx/pbx_spool.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/pbx/pbx_spool.c?view=diff&rev=160551&r1=160550&r2=160551
==============================================================================
--- branches/1.4/pbx/pbx_spool.c (original)
+++ branches/1.4/pbx/pbx_spool.c Wed Dec  3 10:58:34 2008
@@ -47,6 +47,7 @@
 #include "asterisk/module.h"
 #include "asterisk/options.h"
 #include "asterisk/utils.h"
+#include "asterisk/options.h"
 
 /*
  * pbx_spool is similar in spirit to qcall, but with substantially enhanced functionality...
@@ -446,9 +447,15 @@
 	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)) {
 			if ((st.st_mtime != last) || (next && (now > next))) {




More information about the asterisk-commits mailing list