[asterisk-commits] mvanbaak: trunk r215622 - /trunk/main/features.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Sep 2 15:21:55 CDT 2009
Author: mvanbaak
Date: Wed Sep 2 15:21:51 2009
New Revision: 215622
URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=215622
Log:
- lock channel before looking for a channel variable
- Init the parkings list member of struct parkinglot.
Thanks Sean for the explanation why this should be here.
Modified:
trunk/main/features.c
Modified: trunk/main/features.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/main/features.c?view=diff&rev=215622&r1=215621&r2=215622
==============================================================================
--- trunk/main/features.c (original)
+++ trunk/main/features.c Wed Sep 2 15:21:51 2009
@@ -649,7 +649,9 @@
/* Lock parking list */
AST_LIST_LOCK(&parkinglot->parkings);
/* Check for channel variable PARKINGEXTEN */
+ ast_channel_lock(chan);
parkingexten = pbx_builtin_getvar_helper(chan, "PARKINGEXTEN");
+ ast_channel_unlock(chan);
if (!ast_strlen_zero(parkingexten)) {
/*!\note The API forces us to specify a numeric parking slot, even
* though the architecture would tend to support non-numeric extensions
@@ -3729,6 +3731,7 @@
return NULL;
ast_copy_string(newlot->name, name, sizeof(newlot->name));
+ AST_LIST_HEAD_INIT(&newlot->parkings);
return newlot;
}
More information about the asterisk-commits
mailing list