aboutsummaryrefslogtreecommitdiffstats
path: root/channels
diff options
context:
space:
mode:
authorpabelanger <pabelanger@f38db490-d61c-443f-a65b-d21fe96a405b>2010-07-27 02:57:33 +0000
committerpabelanger <pabelanger@f38db490-d61c-443f-a65b-d21fe96a405b>2010-07-27 02:57:33 +0000
commit3b62338056e321874db4ea750535798d981ae8b2 (patch)
tree6d8c7541388b930e8fb079c88ea0f4fd7a2a3189 /channels
parent44af92a6d635bdd3d6043ecd6e56a1a5470952a0 (diff)
If dringXcontext is null, fallback to default context value.
(closes issue #17693) Reported by: iasgoscouk Patches: issue17693.patch uploaded by pabelanger (license 224) Tested by: iasgoscouk Review: https://reviewboard.asterisk.org/r/803/ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.8@279755 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_dahdi.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/channels/chan_dahdi.c b/channels/chan_dahdi.c
index 0e64fac09..20accac26 100644
--- a/channels/chan_dahdi.c
+++ b/channels/chan_dahdi.c
@@ -1825,8 +1825,8 @@ static int my_distinctive_ring(struct ast_channel *chan, void *pvt, int idx, int
if (distMatches == 3) {
/* The ring matches, set the context to whatever is for distinctive ring.. */
- ast_copy_string(p->context, p->drings.ringContext[counter].contextData, sizeof(p->context));
- ast_copy_string(chan->context, p->drings.ringContext[counter].contextData, sizeof(chan->context));
+ ast_copy_string(p->context, S_OR(p->drings.ringContext[counter].contextData, p->defcontext), sizeof(p->context));
+ ast_copy_string(chan->context, S_OR(p->drings.ringContext[counter].contextData, p->defcontext), sizeof(chan->context));
ast_verb(3, "Distinctive Ring matched context %s\n",p->context);
break;
}
@@ -10184,8 +10184,8 @@ static void *analog_ss_thread(void *data)
if (distMatches == 3) {
/* The ring matches, set the context to whatever is for distinctive ring.. */
- ast_copy_string(p->context, p->drings.ringContext[counter].contextData, sizeof(p->context));
- ast_copy_string(chan->context, p->drings.ringContext[counter].contextData, sizeof(chan->context));
+ ast_copy_string(p->context, S_OR(p->drings.ringContext[counter].contextData, p->defcontext), sizeof(p->context));
+ ast_copy_string(chan->context, S_OR(p->drings.ringContext[counter].contextData, p->defcontext), sizeof(chan->context));
ast_verb(3, "Distinctive Ring matched context %s\n",p->context);
break;
}
@@ -10422,8 +10422,8 @@ static void *analog_ss_thread(void *data)
}
if (distMatches == 3) {
/* The ring matches, set the context to whatever is for distinctive ring.. */
- ast_copy_string(p->context, p->drings.ringContext[counter].contextData, sizeof(p->context));
- ast_copy_string(chan->context, p->drings.ringContext[counter].contextData, sizeof(chan->context));
+ ast_copy_string(p->context, S_OR(p->drings.ringContext[counter].contextData, p->defcontext), sizeof(p->context));
+ ast_copy_string(chan->context, S_OR(p->drings.ringContext[counter].contextData, p->defcontext), sizeof(chan->context));
ast_verb(3, "Distinctive Ring matched context %s\n",p->context);
break;
}