mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-03 11:25:35 +00:00
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
This commit is contained in:
committed by
Kevin Harwell
parent
ea8d2ca17c
commit
8ec9e58eb4
@@ -110,6 +110,8 @@ int parking_lot_get_space(struct parking_lot *lot, int target_override)
|
|||||||
|
|
||||||
if (target_override >= lot->cfg->parking_start && target_override <= lot->cfg->parking_stop) {
|
if (target_override >= lot->cfg->parking_start && target_override <= lot->cfg->parking_stop) {
|
||||||
original_target = target_override;
|
original_target = target_override;
|
||||||
|
} else if (target_override > -1) {
|
||||||
|
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);
|
||||||
}
|
}
|
||||||
|
|
||||||
current_target = original_target;
|
current_target = original_target;
|
||||||
|
Reference in New Issue
Block a user