[asterisk-commits] crichter: branch 1.4 r45916 - in /branches/1.4: ./ channels/chan_misdn.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Sun Oct 22 14:44:47 MST 2006


Author: crichter
Date: Sun Oct 22 16:44:46 2006
New Revision: 45916

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

........
r45808 | crichter | 2006-10-21 14:35:13 +0200 (Sat, 21 Oct 2006) | 1 line

fixed issue, that if chan_misdn is loaded and couldn't be initialized it would cause a segfault after 'reload'. Reported by Drew/Matt thx.
........

Modified:
    branches/1.4/   (props changed)
    branches/1.4/channels/chan_misdn.c

Propchange: branches/1.4/
------------------------------------------------------------------------------
Binary property 'branch-1.2-merged' - no diff available.

Modified: branches/1.4/channels/chan_misdn.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/channels/chan_misdn.c?rev=45916&r1=45915&r2=45916&view=diff
==============================================================================
--- branches/1.4/channels/chan_misdn.c (original)
+++ branches/1.4/channels/chan_misdn.c Sun Oct 22 16:44:46 2006
@@ -78,6 +78,7 @@
 
 char global_tracefile[BUFFERSIZE+1];
 
+static int g_config_initialized=0;
 
 struct misdn_jb{
 	int size;
@@ -956,6 +957,11 @@
 static void reload_config(void)
 {
 	int i, cfg_debug;
+
+	if (!g_config_initialized) {
+		ast_log(LOG_WARNING, "chan_misdn is not initialized properly, still reloading ?\n");
+		return ;
+	}
 	
 	free_robin_list();
 	misdn_cfg_reload();
@@ -4530,7 +4536,6 @@
  *******************************************/
 
 
-static int g_config_initialized=0;
 
 static int unload_module(void)
 {



More information about the asterisk-commits mailing list