aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authormvanbaak <mvanbaak@f38db490-d61c-443f-a65b-d21fe96a405b>2009-09-02 20:55:02 +0000
committermvanbaak <mvanbaak@f38db490-d61c-443f-a65b-d21fe96a405b>2009-09-02 20:55:02 +0000
commit08435d9a59ff22e4518e80f65046b4a501276e1a (patch)
tree50d632ab8c638560dd748dc9f999e2251d743d2b /main
parentf815b687c0a616abdb04012dfde1e03e1d1d9f73 (diff)
Merged revisions 215622 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ........ r215622 | mvanbaak | 2009-09-02 22:21:51 +0200 (Wed, 02 Sep 2009) | 4 lines - 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. ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@215647 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main')
-rw-r--r--main/features.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/main/features.c b/main/features.c
index 0ead4bf92..c6f9316f0 100644
--- a/main/features.c
+++ b/main/features.c
@@ -593,7 +593,9 @@ static struct parkeduser *park_space_reserve(struct ast_channel *chan,
/* 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
@@ -3506,6 +3508,7 @@ static struct ast_parkinglot *create_parkinglot(char *name)
return NULL;
ast_copy_string(newlot->name, name, sizeof(newlot->name));
+ AST_LIST_HEAD_INIT(&newlot->parkings);
return newlot;
}