From 1815c0b66b6dc293f924af50c1f8eb3edd7a0823 Mon Sep 17 00:00:00 2001 From: qwell Date: Wed, 24 Oct 2007 20:56:47 +0000 Subject: 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 --- channels/chan_zap.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'channels/chan_zap.c') 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); -- cgit v1.2.3