summaryrefslogtreecommitdiff
path: root/channel.c
diff options
context:
space:
mode:
authorKevin P. Fleming <kpfleming@digium.com>2005-10-31 15:34:11 +0000
committerKevin P. Fleming <kpfleming@digium.com>2005-10-31 15:34:11 +0000
commit8fb55e2478aa153f0ce960b445352998125146f4 (patch)
treee17cabde9991f5c9bc212138afd5b7b1206e8c03 /channel.c
parent7ef0527a7d85cc146e3200d08311b1a1af67b951 (diff)
fix various bugs related to list handling of channel variables (issue #5548)
use nolock lists for channel variables, since no locks are needed (these lists are either temporary or protected by the channel's own lock) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6900 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channel.c')
-rwxr-xr-xchannel.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/channel.c b/channel.c
index c3f3d0384..6aa64e495 100755
--- a/channel.c
+++ b/channel.c
@@ -585,7 +585,7 @@ struct ast_channel *ast_channel_alloc(int needqueue)
snprintf(tmp->uniqueid, sizeof(tmp->uniqueid), "%li.%d", (long) time(NULL), uniqueint++);
headp = &tmp->varshead;
ast_mutex_init(&tmp->lock);
- AST_LIST_HEAD_INIT(headp);
+ AST_LIST_HEAD_INIT_NOLOCK(headp);
strcpy(tmp->context, "default");
ast_copy_string(tmp->language, defaultlanguage, sizeof(tmp->language));
strcpy(tmp->exten, "s");
@@ -2976,7 +2976,7 @@ int ast_do_masquerade(struct ast_channel *original)
original->fds[x] = clone->fds[x];
}
clone_variables(original, clone);
- clone->varshead.first = NULL;
+ AST_LIST_HEAD_INIT_NOLOCK(&clone->varshead);
/* Presense of ADSI capable CPE follows clone */
original->adsicpe = clone->adsicpe;
/* Bridge remains the same */