diff options
author | jpeeler <jpeeler@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-01-08 17:18:41 +0000 |
---|---|---|
committer | jpeeler <jpeeler@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-01-08 17:18:41 +0000 |
commit | a896f4d64aa1572c102c98d50ee65f071fd26f3d (patch) | |
tree | 0bc153e9d92d3b10733098125a35b5a99562e931 | |
parent | 3275e9cd641c743200238a6a97054888629a6888 (diff) |
Stop trying to find a parking space after traversing the parkinglot one time.
(closes issue #16428)
Reported by: Yasuhiro Konishi
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@238583 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r-- | main/features.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/main/features.c b/main/features.c index 261ba4670..423ff27d7 100644 --- a/main/features.c +++ b/main/features.c @@ -754,7 +754,7 @@ static struct parkeduser *park_space_reserve(struct ast_channel *chan, for (i = start; 1; i++) { if (i == parkinglot->parking_stop + 1) { i = parkinglot->parking_start - 1; - continue; + break; } AST_LIST_TRAVERSE(&parkinglot->parkings, cur, list) { @@ -762,8 +762,7 @@ static struct parkeduser *park_space_reserve(struct ast_channel *chan, break; } } - - if (!cur || i == start - 1) { + if (!cur) { parking_space = i; break; } |