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: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@114923 65c4cc65-6c06-0410-ace0-fbb531ad65f3
1.6.0
Jason Parker 17 years ago
parent 87b670f1ff
commit 76e257a8f9

@ -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]);

Loading…
Cancel
Save