summaryrefslogtreecommitdiff
path: root/addons/chan_ooh323.c
diff options
context:
space:
mode:
Diffstat (limited to 'addons/chan_ooh323.c')
-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")) {