[Asterisk-cvs] asterisk/channels chan_zap.c,1.148,1.149

martinp at lists.digium.com martinp at lists.digium.com
Fri Dec 5 17:17:58 CST 2003


Update of /usr/cvsroot/asterisk/channels
In directory mongoose.digium.com:/tmp/cvs-serv27643/channels

Modified Files:
	chan_zap.c 
Log Message:
Provide a channel if PRI_EVENT_RING comes without a channel


Index: chan_zap.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_zap.c,v
retrieving revision 1.148
retrieving revision 1.149
diff -u -d -r1.148 -r1.149
--- chan_zap.c	4 Dec 2003 00:03:08 -0000	1.148
+++ chan_zap.c	5 Dec 2003 23:09:24 -0000	1.149
@@ -5991,6 +5991,9 @@
 			case PRI_EVENT_RING:
 				chan = e->ring.channel;
 				if (e->e==PRI_EVENT_RING) {
+					/* if no channel specified find one empty */
+					if (chan == -1)
+						chan = pri_find_empty_chan(pri);
 					if ((chan < 1) || (chan > pri->channels)) {
 						ast_log(LOG_WARNING, "Ring requested on odd channel number %d span %d\n", chan, pri->span);
 						chan = 0;




More information about the svn-commits mailing list