From 3eb8f0a8dceb3060865d1a635cba13cf7eda5aba Mon Sep 17 00:00:00 2001
From: Tilghman Lesher <tilghman@meg.abyt.es>
Date: Thu, 14 Jan 2010 17:34:53 +0000
Subject: [PATCH] Similarly, ensure that matchcid is duplicated correctly when
 merging contexts.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@240175 65c4cc65-6c06-0410-ace0-fbb531ad65f3
---
 main/pbx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/main/pbx.c b/main/pbx.c
index d0de1b264e..b9ba3fb799 100644
--- a/main/pbx.c
+++ b/main/pbx.c
@@ -6921,7 +6921,7 @@ static void context_merge(struct ast_context **extcontexts, struct ast_hashtab *
 				dupdstr = ast_strdup(prio_item->data);
 
 				res1 = ast_add_extension2(new, 0, prio_item->exten, prio_item->priority, prio_item->label, 
-										  prio_item->cidmatch, prio_item->app, dupdstr, prio_item->datad, prio_item->registrar);
+										  prio_item->matchcid ? prio_item->cidmatch : NULL, prio_item->app, dupdstr, prio_item->datad, prio_item->registrar);
 				if (!res1 && new_exten_item && new_prio_item){
 					ast_verb(3,"Dropping old dialplan item %s/%s/%d [%s(%s)] (registrar=%s) due to conflict with new dialplan\n",
 							context->name, prio_item->exten, prio_item->priority, prio_item->app, (char*)prio_item->data, prio_item->registrar);
-- 
GitLab