mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-05 20:20:07 +00:00
don't use '%i' at all, since we have no current use cases that need non base-10 parsing (bug #4110)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5533 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -287,7 +287,7 @@ static int iax_template_parse(struct iax_template *cur, struct ast_config *cfg,
|
||||
v = ast_variable_browse(cfg, s);
|
||||
while(v) {
|
||||
if (!strcasecmp(v->name, "port") || !strcasecmp(v->name, "serverport")) {
|
||||
if ((sscanf(v->value, "%i", &x) == 1) && (x > 0) && (x < 65535)) {
|
||||
if ((sscanf(v->value, "%d", &x) == 1) && (x > 0) && (x < 65535)) {
|
||||
if (!strcasecmp(v->name, "port")) {
|
||||
cur->port = x;
|
||||
foundportno = 1;
|
||||
@@ -313,7 +313,7 @@ static int iax_template_parse(struct iax_template *cur, struct ast_config *cfg,
|
||||
} else
|
||||
ast_log(LOG_WARNING, "Ignoring invalid codec '%s' for '%s' at line %d\n", v->value, s, v->lineno);
|
||||
} else if (!strcasecmp(v->name, "tos")) {
|
||||
if (sscanf(v->value, "%i", &x) == 1)
|
||||
if (sscanf(v->value, "%d", &x) == 1)
|
||||
cur->tos = x & 0xff;
|
||||
else if (!strcasecmp(v->value, "lowdelay"))
|
||||
cur->tos = IPTOS_LOWDELAY;
|
||||
|
Reference in New Issue
Block a user