diff options
author | qwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-10-24 20:56:47 +0000 |
---|---|---|
committer | qwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-10-24 20:56:47 +0000 |
commit | 1815c0b66b6dc293f924af50c1f8eb3edd7a0823 (patch) | |
tree | 4a9a5bc8f6d77bf33e3f33f2967c69de1692bb45 /channels | |
parent | a7eea7f188a908d83fb9d4f9ea42c436ba71db9b (diff) |
Correctly respect hidecalleridname configuration option.
Simplify code slightly in the process.
Issue 11079, reported by ddv2005
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@86982 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r-- | channels/chan_zap.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/channels/chan_zap.c b/channels/chan_zap.c index 90dae4345..dc6bad66a 100644 --- a/channels/chan_zap.c +++ b/channels/chan_zap.c @@ -2058,17 +2058,18 @@ static int zt_call(struct ast_channel *ast, char *rdest, int timeout) c++; else c = dest; - if (!p->hidecalleridname) - n = ast->cid.cid_name; - else - n = NULL; + + l = NULL; + n = NULL; + if (!p->hidecallerid) { l = ast->cid.cid_num; - n = ast->cid.cid_name; - } else { - l = NULL; - n = NULL; + if (!p->hidecalleridname) { + n = ast->cid.cid_name; + } } + + if (strlen(c) < p->stripmsd) { ast_log(LOG_WARNING, "Number '%s' is shorter than stripmsd (%d)\n", c, p->stripmsd); ast_mutex_unlock(&p->lock); |