summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins2 <jenkins2@gerrit.asterisk.org>2018-01-06 20:27:39 -0600
committerGerrit Code Review <gerrit2@gerrit.digium.api>2018-01-06 20:27:39 -0600
commit5745f3489b33e37376107688117949b9aa167314 (patch)
tree31548f6b554789c8636bdd8e50d8046a089be895
parent96348acbe867c7befaf64e881957a38b836317b6 (diff)
parentdda0ab236d9730ac36fc1631eb4ef802c8ce4a0c (diff)
Merge "chan_ooh323: Limit outgoinglimit to positive values as intended." into 13
-rw-r--r--addons/chan_ooh323.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/addons/chan_ooh323.c b/addons/chan_ooh323.c
index 285ed2849..3afcecd96 100644
--- a/addons/chan_ooh323.c
+++ b/addons/chan_ooh323.c
@@ -2604,9 +2604,12 @@ static struct ooh323_peer *build_peer(const char *name, struct ast_variable *v,
}
} 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")) {