From: Naveen Albert Date: Mon, 30 May 2022 20:55:33 +0000 (+0000) Subject: res_parking: Warn if out of bounds parking spot requested. X-Git-Tag: 18.13.0-rc1~16 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=89f3def351a252c36445132aea2d6db24a5a3885;p=thirdparty%2Fasterisk.git 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 --- diff --git a/res/parking/parking_controller.c b/res/parking/parking_controller.c index 365acddb7f..9b789ceaec 100644 --- a/res/parking/parking_controller.c +++ b/res/parking/parking_controller.c @@ -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) { 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;