[Asterisk-cvs] asterisk/include/asterisk cdr.h, 1.31,
1.32 chanvars.h, 1.8, 1.9 linkedlists.h, 1.18, 1.19
kpfleming
kpfleming
Mon Oct 31 10:42:12 CST 2005
Update of /usr/cvsroot/asterisk/include/asterisk
In directory mongoose.digium.com:/tmp/cvs-serv3197/include/asterisk
Modified Files:
cdr.h chanvars.h linkedlists.h
Log Message:
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)
Index: cdr.h
===================================================================
RCS file: /usr/cvsroot/asterisk/include/asterisk/cdr.h,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -d -r1.31 -r1.32
--- cdr.h 26 Oct 2005 23:11:36 -0000 1.31
+++ cdr.h 31 Oct 2005 15:34:11 -0000 1.32
@@ -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 {
Index: chanvars.h
===================================================================
RCS file: /usr/cvsroot/asterisk/include/asterisk/chanvars.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- chanvars.h 24 Oct 2005 20:12:06 -0000 1.8
+++ chanvars.h 31 Oct 2005 15:34:11 -0000 1.9
@@ -31,6 +31,8 @@
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);
Index: linkedlists.h
===================================================================
RCS file: /usr/cvsroot/asterisk/include/asterisk/linkedlists.h,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- linkedlists.h 28 Oct 2005 16:32:08 -0000 1.18
+++ linkedlists.h 31 Oct 2005 15:34:11 -0000 1.19
@@ -369,6 +369,8 @@
#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)
/*!
More information about the svn-commits
mailing list