[Asterisk-cvs] asterisk/channels chan_zap.c,1.184,1.185

citats at lists.digium.com citats at lists.digium.com
Wed Mar 10 03:40:26 CST 2004


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

Modified Files:
	chan_zap.c 
Log Message:
Make distinctiveringdetection configurable per channel (bug 1168)


Index: chan_zap.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_zap.c,v
retrieving revision 1.184
retrieving revision 1.185
diff -u -d -r1.184 -r1.185
--- chan_zap.c	8 Mar 2004 04:26:36 -0000	1.184
+++ chan_zap.c	10 Mar 2004 08:33:07 -0000	1.185
@@ -392,6 +392,7 @@
 	struct zt_pvt *prev;			/* Prev channel in list */
 
 	struct zt_distRings drings;
+	int usedistinctiveringdetection;
 
 	char context[AST_MAX_EXTENSION];
 	char defcontext[AST_MAX_EXTENSION];
@@ -4667,7 +4668,7 @@
 							break;
 					}
 				}
-				if (usedistinctiveringdetection == 1) {
+				if (p->usedistinctiveringdetection == 1) {
 					if(option_verbose > 2)
 						/* this only shows up if you have n of the dring patterns filled in */
 						ast_verbose( VERBOSE_PREFIX_3 "Detected ring pattern: %d,%d,%d\n",curRingData[0],curRingData[1],curRingData[2]);
@@ -5522,6 +5523,7 @@
 		/* Flag to destroy the channel must be cleared on new mkif.  Part of changes for reload to work */
 		tmp->destroy = 0;
 		tmp->drings = drings;
+		tmp->usedistinctiveringdetection = usedistinctiveringdetection;
 		tmp->callwaitingcallerid = callwaitingcallerid;
 		tmp->threewaycalling = threewaycalling;
 		tmp->adsi = adsi;
@@ -7406,7 +7408,7 @@
 				chan = strsep(&c, ",");
 			}
 		} else if (!strcasecmp(v->name, "usedistinctiveringdetection")) {
-			if (!strcasecmp(v->value, "yes")) usedistinctiveringdetection = 1;
+			usedistinctiveringdetection = ast_true(v->value);
 		} else if (!strcasecmp(v->name, "dring1context")) {
 			strncpy(drings.ringContext[0].contextData,v->value,sizeof(drings.ringContext[0].contextData)-1);
 		} else if (!strcasecmp(v->name, "dring2context")) {
@@ -7969,7 +7971,7 @@
 				chan = strsep(&stringp, ",");
 			}
 		} else if (!strcasecmp(v->name, "usedistinctiveringdetection")) {
-			if (!strcasecmp(v->value, "yes")) usedistinctiveringdetection = 1;
+			usedistinctiveringdetection = ast_true(v->value);
 		} else if (!strcasecmp(v->name, "dring1context")) {
 			strncpy(drings.ringContext[0].contextData,v->value,sizeof(drings.ringContext[0].contextData)-1);
 		} else if (!strcasecmp(v->name, "dring2context")) {




More information about the svn-commits mailing list