Skip to content
Snippets Groups Projects
Commit 82ac7fb6 authored by Richard Mudgett's avatar Richard Mudgett
Browse files

Fix ring cadance setup for outgoing calls on FXS ports.

* Fix referencing the wrong variable in chan_dahdi.c:my_set_cadence().

Thanks to Sean Bright for compiling with -Wshadow and finding this bug.
........

Merged revisions 358377 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 358378 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@358379 65c4cc65-6c06-0410-ace0-fbb531ad65f3
parent a0f88217
No related branches found
No related tags found
No related merge requests found
......@@ -2254,7 +2254,7 @@ static int my_get_sub_fd(void *pvt, enum analog_sub sub)
return p->subs[dahdi_sub].dfd;
}
 
static void my_set_cadence(void *pvt, int *cidrings, struct ast_channel *ast)
static void my_set_cadence(void *pvt, int *cid_rings, struct ast_channel *ast)
{
struct dahdi_pvt *p = pvt;
 
......@@ -2262,11 +2262,11 @@ static void my_set_cadence(void *pvt, int *cidrings, struct ast_channel *ast)
if ((p->distinctivering > 0) && (p->distinctivering <= num_cadence)) {
if (ioctl(p->subs[SUB_REAL].dfd, DAHDI_SETCADENCE, &cadences[p->distinctivering - 1]))
ast_log(LOG_WARNING, "Unable to set distinctive ring cadence %d on '%s': %s\n", p->distinctivering, ast_channel_name(ast), strerror(errno));
*cidrings = cidrings[p->distinctivering - 1];
*cid_rings = cidrings[p->distinctivering - 1];
} else {
if (ioctl(p->subs[SUB_REAL].dfd, DAHDI_SETCADENCE, NULL))
ast_log(LOG_WARNING, "Unable to reset default ring on '%s': %s\n", ast_channel_name(ast), strerror(errno));
*cidrings = p->sendcalleridafter;
*cid_rings = p->sendcalleridafter;
}
}
 
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment