[svn-commits] pabelanger: branch 1.8 r279755 - /branches/1.8/channels/chan_dahdi.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Mon Jul 26 21:57:38 CDT 2010


Author: pabelanger
Date: Mon Jul 26 21:57:33 2010
New Revision: 279755

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=279755
Log:
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/

Modified:
    branches/1.8/channels/chan_dahdi.c

Modified: branches/1.8/channels/chan_dahdi.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/channels/chan_dahdi.c?view=diff&rev=279755&r1=279754&r2=279755
==============================================================================
--- branches/1.8/channels/chan_dahdi.c (original)
+++ branches/1.8/channels/chan_dahdi.c Mon Jul 26 21:57:33 2010
@@ -1825,8 +1825,8 @@
 
 			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 @@
 
 							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 @@
 							}
 							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;
 							}




More information about the svn-commits mailing list