mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-22 12:52:33 +00:00
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:
@@ -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 {
|
||||
|
@@ -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);
|
||||
|
@@ -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)
|
||||
|
||||
/*!
|
||||
|
Reference in New Issue
Block a user