diff options
author | mvanbaak <mvanbaak@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-09-02 20:21:51 +0000 |
---|---|---|
committer | mvanbaak <mvanbaak@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-09-02 20:21:51 +0000 |
commit | a458cefb1d9a87de27eb9eb34f4c1fe99a6be6bc (patch) | |
tree | d6ba64898de965dff627ae24b8d0b7a7def9db6a /main/features.c | |
parent | bfcf6481502e39453339a2201c83f63387a95427 (diff) |
- 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/trunk@215622 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/features.c')
-rw-r--r-- | main/features.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/main/features.c b/main/features.c index 2e8bb175d..0a4336f3b 100644 --- a/main/features.c +++ b/main/features.c @@ -649,7 +649,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 @@ -3729,6 +3731,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; } |