From: Michiel van Baak Date: Wed, 2 Sep 2009 20:48:00 +0000 (+0000) Subject: Merged revisions 215622 via svnmerge from X-Git-Tag: 1.6.1.7-rc1~64 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7cb95c7eb70e9bc39f43f89c7ae96149eb08b5c8;p=thirdparty%2Fasterisk.git 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: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@215646 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/main/features.c b/main/features.c index a0bb928321..d987db4c94 100644 --- a/main/features.c +++ b/main/features.c @@ -524,7 +524,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 @@ -3467,6 +3469,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; }