[asterisk-commits] chan ooh323: Limit outgoinglimit to positive values as inten... (asterisk[15])

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sat Jan 6 20:40:33 CST 2018


Jenkins2 has submitted this change and it was merged. ( https://gerrit.asterisk.org/7827 )

Change subject: chan_ooh323: Limit outgoinglimit to positive values as intended.
......................................................................

chan_ooh323: Limit outgoinglimit to positive values as intended.

ASTERISK-27552

Change-Id: Ifbf9d51e7374ca2e8b27ec568f6770050fc1a854
---
M addons/chan_ooh323.c
1 file changed, 5 insertions(+), 2 deletions(-)

Approvals:
  Corey Farrell: Looks good to me, but someone else must approve
  Richard Mudgett: Looks good to me, approved
  Jenkins2: Approved for Submit



diff --git a/addons/chan_ooh323.c b/addons/chan_ooh323.c
index c25c130..1fa721c 100644
--- a/addons/chan_ooh323.c
+++ b/addons/chan_ooh323.c
@@ -2604,9 +2604,12 @@
 				}
 
 			} else if (!strcasecmp(v->name, "outgoinglimit")) {
-            			peer->outgoinglimit = atoi(v->value);
-            			if (peer->outgoinglimit < 0)
+				int val = atoi(v->value);
+				if (val < 0) {
 					peer->outgoinglimit = 0;
+				} else {
+					peer->outgoinglimit = val;
+				}
 			} else if (!strcasecmp(v->name, "accountcode")) {
 				ast_copy_string(peer->accountcode, v->value, sizeof(peer->accountcode));
 			} else if (!strcasecmp(v->name, "faststart")) {

-- 
To view, visit https://gerrit.asterisk.org/7827
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 15
Gerrit-MessageType: merged
Gerrit-Change-Id: Ifbf9d51e7374ca2e8b27ec568f6770050fc1a854
Gerrit-Change-Number: 7827
Gerrit-PatchSet: 4
Gerrit-Owner: Alexander Traud <pabstraud at compuserve.com>
Gerrit-Reviewer: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-commits/attachments/20180106/fd0d14c8/attachment.html>


More information about the asterisk-commits mailing list