aboutsummaryrefslogtreecommitdiffstats
path: root/channels/chan_zap.c
diff options
context:
space:
mode:
authorqwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-10-24 20:56:47 +0000
committerqwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-10-24 20:56:47 +0000
commit1815c0b66b6dc293f924af50c1f8eb3edd7a0823 (patch)
tree4a9a5bc8f6d77bf33e3f33f2967c69de1692bb45 /channels/chan_zap.c
parenta7eea7f188a908d83fb9d4f9ea42c436ba71db9b (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/chan_zap.c')
-rw-r--r--channels/chan_zap.c17
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);