aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjpeeler <jpeeler@f38db490-d61c-443f-a65b-d21fe96a405b>2010-01-08 17:19:37 +0000
committerjpeeler <jpeeler@f38db490-d61c-443f-a65b-d21fe96a405b>2010-01-08 17:19:37 +0000
commit312391c37fbff0aa409ea3f3569b6fb85bd2bafa (patch)
treed8a2408a2ac3b31160cdbd8ad67f41a21fb25725
parentc832cd33eec470d8f013ac466e15e5624220c572 (diff)
Merged revisions 238583 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ........ r238583 | jpeeler | 2010-01-08 11:18:41 -0600 (Fri, 08 Jan 2010) | 5 lines 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/branches/1.6.1@238585 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r--main/features.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/main/features.c b/main/features.c
index 4bfef4e34..5dc41288e 100644
--- a/main/features.c
+++ b/main/features.c
@@ -566,7 +566,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) {
@@ -574,8 +574,7 @@ static struct parkeduser *park_space_reserve(struct ast_channel *chan,
break;
}
}
-
- if (!cur || i == start - 1) {
+ if (!cur) {
parking_space = i;
break;
}