mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-16 23:08:32 +00:00
Merge "chan_ooh323: Limit outgoinglimit to positive values as intended." into 13
This commit is contained in:
@@ -2604,9 +2604,12 @@ static struct ooh323_peer *build_peer(const char *name, struct ast_variable *v,
|
|||||||
}
|
}
|
||||||
|
|
||||||
} else if (!strcasecmp(v->name, "outgoinglimit")) {
|
} else if (!strcasecmp(v->name, "outgoinglimit")) {
|
||||||
peer->outgoinglimit = atoi(v->value);
|
int val = atoi(v->value);
|
||||||
if (peer->outgoinglimit < 0)
|
if (val < 0) {
|
||||||
peer->outgoinglimit = 0;
|
peer->outgoinglimit = 0;
|
||||||
|
} else {
|
||||||
|
peer->outgoinglimit = val;
|
||||||
|
}
|
||||||
} else if (!strcasecmp(v->name, "accountcode")) {
|
} else if (!strcasecmp(v->name, "accountcode")) {
|
||||||
ast_copy_string(peer->accountcode, v->value, sizeof(peer->accountcode));
|
ast_copy_string(peer->accountcode, v->value, sizeof(peer->accountcode));
|
||||||
} else if (!strcasecmp(v->name, "faststart")) {
|
} else if (!strcasecmp(v->name, "faststart")) {
|
||||||
|
|||||||
Reference in New Issue
Block a user