[svn-commits] qwell: trunk r114922 - /trunk/channels/chan_zap.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Thu May 1 11:49:25 CDT 2008


Author: qwell
Date: Thu May  1 11:49:24 2008
New Revision: 114922

URL: http://svn.digium.com/view/asterisk?view=rev&rev=114922
Log:
Allow dringXrange to properly default to 10, as was done in 1.4.

dringXrange is a new feature that was added, and it attempted to default, but only when the option was specified.

Modified:
    trunk/channels/chan_zap.c

Modified: trunk/channels/chan_zap.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_zap.c?view=diff&rev=114922&r1=114921&r2=114922
==============================================================================
--- trunk/channels/chan_zap.c (original)
+++ trunk/channels/chan_zap.c Thu May  1 11:49:24 2008
@@ -8380,7 +8380,15 @@
 			if (conf.timing.debouncetime >= 0)
 				p.debouncetime = conf.timing.debouncetime;
 		}
-		
+
+		/* 10 is a nice default. */
+		if (conf.chan.drings.ringnum[0].range == 0)
+			conf.chan.drings.ringnum[0].range = 10;
+		if (conf.chan.drings.ringnum[1].range == 0)
+			conf.chan.drings.ringnum[1].range = 10;
+		if (conf.chan.drings.ringnum[2].range == 0)
+			conf.chan.drings.ringnum[2].range = 10;
+
 		/* dont set parms on a pseudo-channel (or CRV) */
 		if (tmp->subs[SUB_REAL].zfd >= 0)
 		{
@@ -13313,19 +13321,10 @@
 			ast_copy_string(confp->chan.drings.ringContext[2].contextData,v->value,sizeof(confp->chan.drings.ringContext[2].contextData));
 		} else if (!strcasecmp(v->name, "dring1range")) {
 			confp->chan.drings.ringnum[0].range = atoi(v->value);
-			/* 10 is a nice default. */
-			if (confp->chan.drings.ringnum[0].range == 0)
-				confp->chan.drings.ringnum[0].range = 10;
 		} else if (!strcasecmp(v->name, "dring2range")) {
 			confp->chan.drings.ringnum[1].range = atoi(v->value);
-			/* 10 is a nice default. */
-			if (confp->chan.drings.ringnum[1].range == 0)
-				confp->chan.drings.ringnum[1].range = 10;
 		} else if (!strcasecmp(v->name, "dring3range")) {
 			confp->chan.drings.ringnum[2].range = atoi(v->value);
-			/* 10 is a nice default. */
-			if (confp->chan.drings.ringnum[2].range == 0)
-				confp->chan.drings.ringnum[2].range = 10;
 		} else if (!strcasecmp(v->name, "dring1")) {
 			ringc = v->value;
 			sscanf(ringc, "%d,%d,%d", &confp->chan.drings.ringnum[0].ring[0], &confp->chan.drings.ringnum[0].ring[1], &confp->chan.drings.ringnum[0].ring[2]);




More information about the svn-commits mailing list