[asterisk-commits] qwell: branch 1.6.0 r114923 - in /branches/1.6.0: ./ channels/chan_zap.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu May 1 11:52:08 CDT 2008


Author: qwell
Date: Thu May  1 11:52:07 2008
New Revision: 114923

URL: http://svn.digium.com/view/asterisk?view=rev&rev=114923
Log:
Merged revisions 114922 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

........
r114922 | qwell | 2008-05-01 11:49:24 -0500 (Thu, 01 May 2008) | 10 lines

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.

(closes issue #12536)
Reported by: bjm
Patches:
      12536-dringXrange.diff uploaded by qwell (license 4)
Tested by: bjm

........

Modified:
    branches/1.6.0/   (props changed)
    branches/1.6.0/channels/chan_zap.c

Propchange: branches/1.6.0/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.

Modified: branches/1.6.0/channels/chan_zap.c
URL: http://svn.digium.com/view/asterisk/branches/1.6.0/channels/chan_zap.c?view=diff&rev=114923&r1=114922&r2=114923
==============================================================================
--- branches/1.6.0/channels/chan_zap.c (original)
+++ branches/1.6.0/channels/chan_zap.c Thu May  1 11:52:07 2008
@@ -8374,7 +8374,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)
 		{
@@ -13296,19 +13304,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 asterisk-commits mailing list