aboutsummaryrefslogtreecommitdiffstats
path: root/main/channel.c
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-11-05 17:46:02 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-11-05 17:46:02 +0000
commit577d6170beff5e8f0f2cf6f30442c4a36659fd70 (patch)
treedc1f5efebc3d2e60aaa0b6849de8f1d8a9f92b98 /main/channel.c
parent620ba9594042c22c2e5b67ae2037c7170a5f67db (diff)
Fix up datastore handling in ast_do_masquerade(). The code is intended to move
any channel datastores from the old channel to the new one. However, it did not use the linked list macros properly to accomplish the task. The existing code would only work if there was only a single datastore on the old channel. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@88624 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/channel.c')
-rw-r--r--main/channel.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/main/channel.c b/main/channel.c
index d1ea7b438..a278462d1 100644
--- a/main/channel.c
+++ b/main/channel.c
@@ -3786,8 +3786,7 @@ int ast_do_masquerade(struct ast_channel *original)
/* Move data stores over */
if (AST_LIST_FIRST(&clone->datastores))
- AST_LIST_INSERT_TAIL(&original->datastores, AST_LIST_FIRST(&clone->datastores), entry);
- AST_LIST_HEAD_INIT_NOLOCK(&clone->datastores);
+ AST_LIST_APPEND_LIST(&original->datastores, &clone->datastores, entry);
clone_variables(original, clone);
/* Presense of ADSI capable CPE follows clone */