aboutsummaryrefslogtreecommitdiffstats
path: root/channels
diff options
context:
space:
mode:
authorrmudgett <rmudgett@f38db490-d61c-443f-a65b-d21fe96a405b>2010-04-06 18:08:32 +0000
committerrmudgett <rmudgett@f38db490-d61c-443f-a65b-d21fe96a405b>2010-04-06 18:08:32 +0000
commit65403051b5a2d23840242c3db1574dd24bb60a48 (patch)
treeab83a185e925bca788435ede9cef68974aa63c8b /channels
parentbc4364af11ad2068e4f6ab918f4a6153e609e718 (diff)
Fix malformed if test. Regression of issue 15883.
Converted if statement to a switch statement for clarity. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.1@256365 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_dahdi.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/channels/chan_dahdi.c b/channels/chan_dahdi.c
index 295c041ca..7c467c669 100644
--- a/channels/chan_dahdi.c
+++ b/channels/chan_dahdi.c
@@ -9191,12 +9191,18 @@ static struct dahdi_pvt *mkintf(int channel, const struct dahdi_chan_conf *conf,
ast_copy_string(tmp->context, conf->chan.context, sizeof(tmp->context));
ast_copy_string(tmp->parkinglot, conf->chan.parkinglot, sizeof(tmp->parkinglot));
tmp->cid_ton = 0;
- if ((tmp->sig != SIG_PRI) || (tmp->sig != SIG_SS7) || (tmp->sig != SIG_BRI) || (tmp->sig != SIG_BRI_PTMP)) {
- 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 {
+ 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));
+ break;
}
ast_copy_string(tmp->mailbox, conf->chan.mailbox, sizeof(tmp->mailbox));
if (channel != CHAN_PSEUDO && !ast_strlen_zero(tmp->mailbox)) {