[asterisk-commits] jpeeler: branch jpeeler/asterisk-sigwork-trunk r200988 - /team/jpeeler/asteri...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Jun 16 11:35:32 CDT 2009


Author: jpeeler
Date: Tue Jun 16 11:35:27 2009
New Revision: 200988

URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=200988
Log:
fix crash in the event of an attempted reconfiguring of a previously configured channel

Modified:
    team/jpeeler/asterisk-sigwork-trunk/channels/chan_dahdi.c
    team/jpeeler/asterisk-sigwork-trunk/channels/sig_pri.c

Modified: team/jpeeler/asterisk-sigwork-trunk/channels/chan_dahdi.c
URL: http://svn.asterisk.org/svn-view/asterisk/team/jpeeler/asterisk-sigwork-trunk/channels/chan_dahdi.c?view=diff&rev=200988&r1=200987&r2=200988
==============================================================================
--- team/jpeeler/asterisk-sigwork-trunk/channels/chan_dahdi.c (original)
+++ team/jpeeler/asterisk-sigwork-trunk/channels/chan_dahdi.c Tue Jun 16 11:35:27 2009
@@ -10425,6 +10425,8 @@
 			}
 #endif
 		} else {
+			/* already exists in interface list */
+			ast_log(LOG_WARNING, "Attempt to configure channel %d with signaling %s ignored because it is already configured to be %s.\n", tmp->channel, dahdi_sig2str(chan_sig), dahdi_sig2str(tmp->sig));
 			chan_sig = tmp->sig;
 			if (tmp->subs[SUB_REAL].dfd > -1) {
 				memset(&p, 0, sizeof(p));
@@ -10752,7 +10754,7 @@
 
 				analog_config_complete(analog_p);
 			}
-		} else {
+		} else if (pchan != NULL) {
 			pchan->channel = tmp->channel;
 			pchan->hidecallerid = tmp->hidecallerid;
 			pchan->hidecalleridname = tmp->hidecalleridname;

Modified: team/jpeeler/asterisk-sigwork-trunk/channels/sig_pri.c
URL: http://svn.asterisk.org/svn-view/asterisk/team/jpeeler/asterisk-sigwork-trunk/channels/sig_pri.c?view=diff&rev=200988&r1=200987&r2=200988
==============================================================================
--- team/jpeeler/asterisk-sigwork-trunk/channels/sig_pri.c (original)
+++ team/jpeeler/asterisk-sigwork-trunk/channels/sig_pri.c Tue Jun 16 11:35:27 2009
@@ -222,8 +222,6 @@
 		/* This is annoying to see on non persistent layer 2 connections.  Let's not complain in that case */
 		if (pri->sig != SIG_BRI_PTMP) {
 			ast_log(LOG_WARNING, "No D-channels available!  Using Primary channel as D-channel anyway!\n");
-			//ast_log(LOG_WARNING, "No D-channels available!  Using Primary channel %d as D-channel anyway!\n",
-			//	pri->dchannels[newslot]);
 		}
 	}
 #if 0
@@ -576,7 +574,6 @@
 	if (ast_exists_extension(chan, chan->context, exten, 1, p->cid_num)) {
 		/* Start the real PBX */
 		ast_copy_string(chan->exten, exten, sizeof(chan->exten));
-		//if (p->dsp) ast_dsp_digitreset(p->dsp);
 		sig_pri_set_echocanceller(p, 1);
 		ast_setstate(chan, AST_STATE_RING);
 		res = ast_pbx_run(chan);
@@ -2314,7 +2311,7 @@
 	}
 }
 
-struct sig_pri_chan * sig_pri_chan_new(void *pvt_data, struct sig_pri_callback *callback, struct sig_pri_pri *pri, int logicalspan, int channo)
+struct sig_pri_chan *sig_pri_chan_new(void *pvt_data, struct sig_pri_callback *callback, struct sig_pri_pri *pri, int logicalspan, int channo)
 {
 	struct sig_pri_chan *p;
 




More information about the asterisk-commits mailing list