[Asterisk-code-review] res_parking: Warn if out of bounds parking spot requested. (asterisk[16])

N A asteriskteam at digium.com
Thu Jun 2 12:20:05 CDT 2022


N A has uploaded this change for review. ( https://gerrit.asterisk.org/c/asterisk/+/18588 )


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(-)



  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/88/18588/1

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/+/18588
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 16
Gerrit-Change-Id: I1080371e4f63e94724455003753014fbd3f95fbf
Gerrit-Change-Number: 18588
Gerrit-PatchSet: 1
Gerrit-Owner: N A <mail at interlinked.x10host.com>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20220602/57f172bf/attachment-0001.html>


More information about the asterisk-code-review mailing list