diff options
author | Alexander Traud <pabstraud@compuserve.com> | 2018-01-05 13:42:07 +0100 |
---|---|---|
committer | Alexander Traud <pabstraud@compuserve.com> | 2018-01-05 08:02:21 -0600 |
commit | f0c8f04c735ac7a4d14e07ceee33e134edec2120 (patch) | |
tree | 267435a3078739eca75c2c4ef6ac08352ae4c6ec /addons | |
parent | 4eccf697e1c9ee87655cf8a56449dc353cec8a66 (diff) |
chan_ooh323: Limit outgoinglimit to positive values as intended.
ASTERISK-27552
Change-Id: Ifbf9d51e7374ca2e8b27ec568f6770050fc1a854
Diffstat (limited to 'addons')
-rw-r--r-- | addons/chan_ooh323.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/addons/chan_ooh323.c b/addons/chan_ooh323.c index c25c130d4..1fa721cd3 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")) { |