aboutsummaryrefslogtreecommitdiffstats
path: root/channels
diff options
context:
space:
mode:
authorqwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b>2008-05-01 16:52:07 +0000
committerqwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b>2008-05-01 16:52:07 +0000
commit1f2f4baea7771e7a690f6fad2128dc00877c95bc (patch)
tree721964bb4bc4d66839afbcf31b6ad979b11325f9 /channels
parentc81a680e6069a90e0d111e785109964e190f39e0 (diff)
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 ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@114923 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_zap.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/channels/chan_zap.c b/channels/chan_zap.c
index 52aabbb10..c267116d1 100644
--- a/channels/chan_zap.c
+++ b/channels/chan_zap.c
@@ -8374,7 +8374,15 @@ static struct zt_pvt *mkintf(int channel, struct zt_chan_conf conf, struct zt_pr
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 @@ static int process_zap(struct zt_chan_conf *confp, struct ast_variable *v, int r
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]);