diff options
author | Jenkins2 <jenkins2@gerrit.asterisk.org> | 2018-01-06 20:56:24 -0600 |
---|---|---|
committer | Gerrit Code Review <gerrit2@gerrit.digium.api> | 2018-01-06 20:56:24 -0600 |
commit | 26e5edd0431cb2f7032cfe780c21b839ff0b5451 (patch) | |
tree | 0f6e5cfb52793641ee01becacb4703d2157e597d /addons | |
parent | bcc2931d22745cbebc11cb20142e8db97055d761 (diff) | |
parent | f0c8f04c735ac7a4d14e07ceee33e134edec2120 (diff) |
Merge "chan_ooh323: Limit outgoinglimit to positive values as intended."
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")) { |