[asterisk-commits] branch crichter/0.4.0 r37377 - /team/crichter/0.4.0/channels/misdn_config.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Tue Jul 11 07:49:20 MST 2006


Author: crichter
Date: Tue Jul 11 09:49:20 2006
New Revision: 37377

URL: http://svn.digium.com/view/asterisk?rev=37377&view=rev
Log:
fixes a bug which could lead to a segfault after reordering config elements in the enum or struct.

Modified:
    team/crichter/0.4.0/channels/misdn_config.c

Modified: team/crichter/0.4.0/channels/misdn_config.c
URL: http://svn.digium.com/view/asterisk/team/crichter/0.4.0/channels/misdn_config.c?rev=37377&r1=37376&r2=37377&view=diff
==============================================================================
--- team/crichter/0.4.0/channels/misdn_config.c (original)
+++ team/crichter/0.4.0/channels/misdn_config.c Tue Jul 11 09:49:20 2006
@@ -575,10 +575,10 @@
 	}
 
 	misdn_cfg_lock();
-	if (port_cfg[port][MISDN_CFG_MSNS-1].ml)
-		iter = port_cfg[port][MISDN_CFG_MSNS-1].ml;
+	if (port_cfg[port][map[MISDN_CFG_MSNS]].ml)
+		iter = port_cfg[port][map[MISDN_CFG_MSNS]].ml;
 	else
-		iter = port_cfg[0][MISDN_CFG_MSNS-1].ml;
+		iter = port_cfg[0][map[MISDN_CFG_MSNS]].ml;
 	for (; iter; iter = iter->next) 
 		if (*(iter->msn) == '*' || ast_extension_match(iter->msn, msn)) {
 			re = 1;



More information about the asterisk-commits mailing list