Update of /usr/cvsroot/asterisk
In directory mongoose.digium.com:/tmp/cvs-serv3197

Modified Files:
        channel.c pbx.c 
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: channel.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channel.c,v
retrieving revision 1.253
retrieving revision 1.254
diff -u -d -r1.253 -r1.254
--- channel.c   28 Oct 2005 23:01:13 -0000      1.253
+++ channel.c   31 Oct 2005 15:34:11 -0000      1.254
@@ -585,7 +585,7 @@
        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 @@
                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 */

Index: pbx.c
===================================================================
RCS file: /usr/cvsroot/asterisk/pbx.c,v
retrieving revision 1.293
retrieving revision 1.294
diff -u -d -r1.293 -r1.294
--- pbx.c       26 Oct 2005 23:11:36 -0000      1.293
+++ pbx.c       31 Oct 2005 15:34:11 -0000      1.294
@@ -6150,7 +6150,7 @@
                ast_verbose( "Asterisk PBX Core Initializing\n");
                ast_verbose( "Registering builtin applications:\n");
        }
-       AST_LIST_HEAD_INIT(&globals);
+       AST_LIST_HEAD_INIT_NOLOCK(&globals);
        ast_cli_register_multiple(pbx_cli, sizeof(pbx_cli) / 
sizeof(pbx_cli[0]));
 
        /* Register builtin applications */

_______________________________________________
Asterisk-Cvs mailing list
[email protected]
http://lists.digium.com/mailman/listinfo/asterisk-cvs

Reply via email to