aboutsummaryrefslogtreecommitdiffstats
path: root/channel.c
diff options
context:
space:
mode:
authorkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2005-10-31 15:34:11 +0000
committerkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2005-10-31 15:34:11 +0000
commit3b5ed22f129ad87a256092965b6537c8bb86cede (patch)
treee17cabde9991f5c9bc212138afd5b7b1206e8c03 /channel.c
parent8615ded129565bd250218b36451f154e0c14ecec (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: http://svn.digium.com/svn/asterisk/trunk@6900 f38db490-d61c-443f-a65b-d21fe96a405b
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 */