[asterisk-commits] rmudgett: branch 1.6.0 r256364 - /branches/1.6.0/channels/chan_dahdi.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Apr 6 13:07:51 CDT 2010
Author: rmudgett
Date: Tue Apr 6 13:07:50 2010
New Revision: 256364
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=256364
Log:
Fix malformed if test. Regression of issue 15883.
Converted if statement to a switch statement for clarity.
Modified:
branches/1.6.0/channels/chan_dahdi.c
Modified: branches/1.6.0/channels/chan_dahdi.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.6.0/channels/chan_dahdi.c?view=diff&rev=256364&r1=256363&r2=256364
==============================================================================
--- branches/1.6.0/channels/chan_dahdi.c (original)
+++ branches/1.6.0/channels/chan_dahdi.c Tue Apr 6 13:07:50 2010
@@ -9004,12 +9004,18 @@
ast_copy_string(tmp->mohsuggest, conf->chan.mohsuggest, sizeof(tmp->mohsuggest));
ast_copy_string(tmp->context, conf->chan.context, sizeof(tmp->context));
tmp->cid_ton = 0;
- if ((tmp->sig != SIG_PRI) || (tmp->sig != SIG_SS7) || (tmp->sig != SIG_BRI) || (tmp->sig != SIG_BRI_PTMP)) {
+ switch (tmp->sig) {
+ case SIG_PRI:
+ case SIG_BRI:
+ case SIG_BRI_PTMP:
+ case SIG_SS7:
+ tmp->cid_num[0] = '\0';
+ tmp->cid_name[0] = '\0';
+ break;
+ default:
ast_copy_string(tmp->cid_num, conf->chan.cid_num, sizeof(tmp->cid_num));
ast_copy_string(tmp->cid_name, conf->chan.cid_name, sizeof(tmp->cid_name));
- } else {
- tmp->cid_num[0] = '\0';
- tmp->cid_name[0] = '\0';
+ break;
}
ast_copy_string(tmp->mailbox, conf->chan.mailbox, sizeof(tmp->mailbox));
if (channel != CHAN_PSEUDO && !ast_strlen_zero(tmp->mailbox)) {
More information about the asterisk-commits
mailing list