Skip to content

Commit bae8092

Browse files
InterLinked1Friendly Automation
authored and
Friendly Automation
committed
res_parking: Warn if out of bounds parking spot requested.
Emits a warning if the user has requested a parking spot that is out of bounds for the requested parking lot. ASTERISK-30086 Change-Id: I1080371e4f63e94724455003753014fbd3f95fbf
1 parent a03b53b commit bae8092

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

res/parking/parking_controller.c

+2
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,8 @@ int parking_lot_get_space(struct parking_lot *lot, int target_override)
110110

111111
if (target_override >= lot->cfg->parking_start && target_override <= lot->cfg->parking_stop) {
112112
original_target = target_override;
113+
} else if (target_override > -1) {
114+
ast_log(LOG_WARNING, "Preferred parking spot %d is out of bounds (%d-%d)\n", target_override, lot->cfg->parking_start, lot->cfg->parking_stop);
113115
}
114116

115117
current_target = original_target;

0 commit comments

Comments
 (0)