[aadk-commits] dbailey: trunk r214 - in /trunk: README scripts/asterisk-aadk.diff

aadk-commits at lists.digium.com aadk-commits at lists.digium.com
Fri Mar 9 10:01:55 MST 2007


Author: dbailey
Date: Fri Mar  9 11:01:55 2007
New Revision: 214

URL: http://svn.digium.com/view/aadk?view=rev&rev=214
Log:
Added patch and updated README file describing the patch so that asterisk does not crash on the appliance when the web-based configuration wizard is running.

Added:
    trunk/scripts/asterisk-aadk.diff   (with props)
Modified:
    trunk/README

Modified: trunk/README
URL: http://svn.digium.com/view/aadk/trunk/README?view=diff&rev=214&r1=213&r2=214
==============================================================================
--- trunk/README (original)
+++ trunk/README Fri Mar  9 11:01:55 2007
@@ -42,8 +42,10 @@
 about missing files such as autoconf.h, Makefile, or potentially others.
 
 Step 4: Building Asterisk
-The first time you build asterisk, please run "build-asterisk default" from 
-within the scripts directory.  
+The first time you build asterisk, you should apply the asterisk-aadk.diff
+patch in the scripts directory to the asterisk source code.  (Detailed below
+in #6 under known limitations)  After applying the patch, please run 
+"build-asterisk default" from within the scripts directory.  
 Simply run the "build-asterisk" script from within the scripts directory if 
 you want to run the menu based asterisk build program without setting the 
 configuration to the default configuration. 
@@ -88,3 +90,13 @@
 will require a larger chunk of contiguous memory to load.  This can
 potentially lead to an issue where the memory gets fragmented enough that
 it simply cannot be run anymore.
+
+6) AADK-0.3.2 has a patch that should be applied to the asterisk files 
+main/manager.c and main/loader.c before compiling.  These patches are required
+for proper operation of asterisk with the web based cconfiguration setup 
+wizard.  This patch prevents kernel panics from occurring during some wizard 
+operations.  
+To apply the patch, perform the following commands:
+
+   cd asterisk/main
+   patch < ../../scripts/asterisk-aadk.diff 

Added: trunk/scripts/asterisk-aadk.diff
URL: http://svn.digium.com/view/aadk/trunk/scripts/asterisk-aadk.diff?view=auto&rev=214
==============================================================================
--- trunk/scripts/asterisk-aadk.diff (added)
+++ trunk/scripts/asterisk-aadk.diff Fri Mar  9 11:01:55 2007
@@ -1,0 +1,39 @@
+Index: ../asterisk/main/loader.c
+===================================================================
+--- ../asterisk/main/loader.c	(revision 58426)
++++ ../asterisk/main/loader.c	(working copy)
+@@ -531,6 +531,12 @@
+ 		return -1;	/* reload already in progress */
+ 	}
+ 
++	if (ast_lastreloadtime && time(NULL) - ast_lastreloadtime < 5) {
++		ast_verbose("The previous reload was less than 5 seconds ago.\n");
++		ast_mutex_unlock(&reloadlock);
++		return -1;
++	}
++
+ 	/* Call "predefined" reload here first */
+ 	for (i = 0; reload_classes[i].name; i++) {
+ 		if (!name || !strcasecmp(name, reload_classes[i].name)) {
+Index: ../asterisk/main/manager.c
+===================================================================
+--- ../asterisk/main/manager.c	(revision 58426)
++++ ../asterisk/main/manager.c	(working copy)
+@@ -1040,7 +1040,7 @@
+ 		astman_send_error(s, m, "Filename not specified");
+ 		return 0;
+ 	}
+-	if (!(cfg = ast_config_load_with_comments(fn))) {
++	if (!(cfg = ast_config_load(fn))) {
+ 		astman_send_error(s, m, "Config file not found");
+ 		return 0;
+ 	}
+@@ -1144,7 +1144,7 @@
+ 		astman_send_error(s, m, "Filename not specified");
+ 		return 0;
+ 	}
+-	if (!(cfg = ast_config_load_with_comments(sfn))) {
++	if (!(cfg = ast_config_load(sfn))) {
+ 		astman_send_error(s, m, "Config file not found");
+ 		return 0;
+ 	}

Propchange: trunk/scripts/asterisk-aadk.diff
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: trunk/scripts/asterisk-aadk.diff
------------------------------------------------------------------------------
    svn:mime-type = text/plain



More information about the aadk-commits mailing list