[Asterisk-code-review] res_parking: Warn if out of bounds parking spot requested. (asterisk[18])
Kevin Harwell
asteriskteam at digium.com
Mon Jun 6 16:53:02 CDT 2022
Kevin Harwell has submitted this change. ( https://gerrit.asterisk.org/c/asterisk/+/18589 )
Change subject: res_parking: Warn if out of bounds parking spot requested.
......................................................................
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
---
M res/parking/parking_controller.c
1 file changed, 2 insertions(+), 0 deletions(-)
Approvals:
Joshua Colp: Looks good to me, but someone else must approve
Kevin Harwell: Looks good to me, approved; Approved for Submit
Benjamin Keith Ford: Looks good to me, but someone else must approve
diff --git a/res/parking/parking_controller.c b/res/parking/parking_controller.c
index 365acdd..9b789ce 100644
--- a/res/parking/parking_controller.c
+++ b/res/parking/parking_controller.c
@@ -110,6 +110,8 @@
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;
--
To view, visit https://gerrit.asterisk.org/c/asterisk/+/18589
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 18
Gerrit-Change-Id: I1080371e4f63e94724455003753014fbd3f95fbf
Gerrit-Change-Number: 18589
Gerrit-PatchSet: 2
Gerrit-Owner: N A <mail at interlinked.x10host.com>
Gerrit-Reviewer: Benjamin Keith Ford <bford at digium.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: Joshua Colp <jcolp at sangoma.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20220606/ea2c7836/attachment.html>
More information about the asterisk-code-review
mailing list