From: Jason Parker Date: Wed, 24 Oct 2007 20:56:47 +0000 (+0000) Subject: Correctly respect hidecalleridname configuration option. X-Git-Tag: 1.4.14~101 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1b7b80da3a97e974c7f7882dc23892d8bf253695;p=thirdparty%2Fasterisk.git Correctly respect hidecalleridname configuration option. Simplify code slightly in the process. Issue 11079, reported by ddv2005 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@86982 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_zap.c b/channels/chan_zap.c index 90dae43453..dc6bad66ac 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);