[svn-commits] branch oej/metermaids - r8115 in /team/oej/metermaids: ./ asterisk.c

svn-commits at lists.digium.com svn-commits at lists.digium.com
Mon Jan 16 19:38:19 MST 2006


Author: oej
Date: Mon Jan 16 20:38:17 2006
New Revision: 8115

URL: http://svn.digium.com/view/asterisk?rev=8115&view=rev
Log:
Merged revisions 8112 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r8112 | kpfleming | 2006-01-17 00:51:37 +0100 (Tue, 17 Jan 2006) | 2 lines

do rlimit check _after_ reading config file, in case 'dumpcore' is specified there

........

Modified:
    team/oej/metermaids/   (props changed)
    team/oej/metermaids/asterisk.c

Propchange: team/oej/metermaids/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Mon Jan 16 20:38:17 2006
@@ -1,1 +1,1 @@
-/branches/1.2:1-7496,7498-8106
+/branches/1.2:1-7496,7498-8114

Modified: team/oej/metermaids/asterisk.c
URL: http://svn.digium.com/view/asterisk/team/oej/metermaids/asterisk.c?rev=8115&r1=8114&r2=8115&view=diff
==============================================================================
--- team/oej/metermaids/asterisk.c (original)
+++ team/oej/metermaids/asterisk.c Mon Jan 16 20:38:17 2006
@@ -100,6 +100,9 @@
 #include "asterisk/pbx.h"
 #include "asterisk/enum.h"
 #include "asterisk/rtp.h"
+#if defined(T38_SUPPORT)
+#include "asterisk/udptl.h"
+#endif
 #include "asterisk/app.h"
 #include "asterisk/lock.h"
 #include "asterisk/utils.h"
@@ -210,6 +213,8 @@
 static int shuttingdown = 0;
 static int restartnow = 0;
 static pthread_t consolethread = AST_PTHREADT_NULL;
+
+static char randompool[256];
 
 #if !defined(LOW_MEMORY)
 struct file_version {
@@ -1091,6 +1096,7 @@
 {
 	if (argc != 3)
 		return RESULT_SHOWUSAGE;
+	ast_cli(fd, "Waiting for inactivity to perform halt\n");
 	quit_handler(0, 2 /* really nicely */, 1 /* safely */, 0 /* don't restart */);
 	return RESULT_SUCCESS;
 }
@@ -1115,6 +1121,7 @@
 {
 	if (argc != 3)
 		return RESULT_SHOWUSAGE;
+	ast_cli(fd, "Waiting for inactivity to perform restart\n");
 	quit_handler(0, 2 /* really nicely */, 1 /* safely */, 1 /* restart */);
 	return RESULT_SUCCESS;
 }
@@ -1933,7 +1940,7 @@
 		/* Run as console (-c at startup, implies nofork) */
 		} else if (!strcasecmp(v->name, "console")) {
 			ast_set2_flag(&ast_options, ast_true(v->value), AST_OPT_FLAG_CONSOLE);
-		/* Run with highg priority if the O/S permits (-p at startup) */
+		/* Run with high priority if the O/S permits (-p at startup) */
 		} else if (!strcasecmp(v->name, "highpriority")) {
 			ast_set2_flag(&ast_options, ast_true(v->value), AST_OPT_FLAG_HIGH_PRIORITY);
 		/* Initialize RSA auth keys (IAX2) (-i at startup) */
@@ -2122,6 +2129,10 @@
 		}
 	}
 
+	if (ast_opt_console && !option_verbose) 
+		ast_verbose("[ Reading Master Configuration ]");
+	ast_readconfig();
+
 	if (ast_opt_dump_core) {
 		struct rlimit l;
 		memset(&l, 0, sizeof(l));
@@ -2131,10 +2142,6 @@
 			ast_log(LOG_WARNING, "Unable to disable core size resource limit: %s\n", strerror(errno));
 		}
 	}
-
-	if (ast_opt_console && !option_verbose) 
-		ast_verbose("[ Reading Master Configuration ]");
-	ast_readconfig();
 
 	if ((!rungroup) && !ast_strlen_zero(ast_config_AST_RUN_GROUP))
 		rungroup = ast_config_AST_RUN_GROUP;
@@ -2288,7 +2295,7 @@
 	   Asterisk is started
 	*/
 	srand((unsigned int) getpid() + (unsigned int) time(NULL));
-	srandom((unsigned int) getpid() + (unsigned int) time(NULL));
+	initstate((unsigned int) getpid() * 65536 + (unsigned int) time(NULL), randompool, sizeof(randompool));
 
 	if (init_logger()) {
 		printf(term_quit());
@@ -2317,6 +2324,9 @@
 		exit(1);
 	}
 	ast_rtp_init();
+#if defined(T38_SUPPORT)
+	ast_udptl_init();
+#endif
 	if (ast_image_init()) {
 		printf(term_quit());
 		exit(1);



More information about the svn-commits mailing list