[Asterisk-code-review] [patch] chan ooh323: Limit outgoinglimit to positive values ... (asterisk[15])

Alexander Traud asteriskteam at digium.com
Fri Jan 5 06:43:13 CST 2018


Alexander Traud has uploaded this change for review. ( https://gerrit.asterisk.org/7827


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

[patch] 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(-)



  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/27/7827/1

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: newchange
Gerrit-Change-Id: Ifbf9d51e7374ca2e8b27ec568f6770050fc1a854
Gerrit-Change-Number: 7827
Gerrit-PatchSet: 1
Gerrit-Owner: Alexander Traud <pabstraud at compuserve.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20180105/dd85e4e1/attachment.html>


More information about the asterisk-code-review mailing list