]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Correctly respect hidecalleridname configuration option.
authorJason Parker <jparker@digium.com>
Wed, 24 Oct 2007 20:56:47 +0000 (20:56 +0000)
committerJason Parker <jparker@digium.com>
Wed, 24 Oct 2007 20:56:47 +0000 (20:56 +0000)
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

channels/chan_zap.c

index 90dae434532c65454b9af47a9f69ddffaa5eab89..dc6bad66ac35e589a0ce9a1bcdf4f83662910339 100644 (file)
@@ -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);