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
This commit is contained in:
Kevin P. Fleming
2005-10-31 15:34:11 +00:00
parent 7ef0527a7d
commit 8fb55e2478
7 changed files with 9 additions and 6 deletions

View File

@@ -47,7 +47,6 @@
#include "asterisk/channel.h"
struct ast_channel;
AST_LIST_HEAD(varshead,ast_var_t);
/*! Responsible for call detail data */
struct ast_cdr {

View File

@@ -31,6 +31,8 @@ struct ast_var_t {
char name[0];
};
AST_LIST_HEAD_NOLOCK(varshead, ast_var_t);
struct ast_var_t *ast_var_assign(const char *name, const char *value);
void ast_var_delete(struct ast_var_t *var);
char *ast_var_name(struct ast_var_t *var);

View File

@@ -369,6 +369,8 @@ struct { \
#define AST_LIST_INSERT_HEAD(head, elm, field) do { \
(elm)->field.next = (head)->first; \
(head)->first = (elm); \
if (!(head)->last) \
(head)->last = (elm); \
} while (0)
/*!