aboutsummaryrefslogtreecommitdiffstats
path: root/pbx/pbx_dundi.c
diff options
context:
space:
mode:
authorkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2005-04-29 17:00:33 +0000
committerkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2005-04-29 17:00:33 +0000
commitb7e6d89aa23372a6a6d647bf6d3bfe3192e4c519 (patch)
treed331e5cecc9b0a3c2d3c3e29adbc134c1d3d0fe2 /pbx/pbx_dundi.c
parenta4b06d6ac114064bbbb705dcdeab9f53c1257f40 (diff)
don't use '%i' at all, since we have no current use cases that need non base-10 parsing (bug #4110)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@5533 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'pbx/pbx_dundi.c')
-rwxr-xr-xpbx/pbx_dundi.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/pbx/pbx_dundi.c b/pbx/pbx_dundi.c
index b80867b29..ca3c4441a 100755
--- a/pbx/pbx_dundi.c
+++ b/pbx/pbx_dundi.c
@@ -4059,7 +4059,7 @@ static void build_mapping(char *name, char *value)
} else if (x >= 4) {
strncpy(map->dcontext, name, sizeof(map->dcontext) - 1);
strncpy(map->lcontext, fields[0], sizeof(map->lcontext) - 1);
- if ((sscanf(fields[1], "%i", &map->weight) == 1) && (map->weight >= 0) && (map->weight < 60000)) {
+ if ((sscanf(fields[1], "%d", &map->weight) == 1) && (map->weight >= 0) && (map->weight < 60000)) {
strncpy(map->dest, fields[3], sizeof(map->dest) - 1);
if ((map->tech = str2tech(fields[2]))) {
map->dead = 0;
@@ -4502,14 +4502,14 @@ static int set_config(char *config_file, struct sockaddr_in* sin)
} else if (!strcasecmp(v->name, "authdebug")) {
authdebug = ast_true(v->value);
} else if (!strcasecmp(v->name, "ttl")) {
- if ((sscanf(v->value, "%i", &x) == 1) && (x > 0) && (x < DUNDI_DEFAULT_TTL)) {
+ if ((sscanf(v->value, "%d", &x) == 1) && (x > 0) && (x < DUNDI_DEFAULT_TTL)) {
dundi_ttl = x;
} else {
ast_log(LOG_WARNING, "'%s' is not a valid TTL at line %d, must be number from 1 to %d\n",
v->value, v->lineno, DUNDI_DEFAULT_TTL);
}
} else if (!strcasecmp(v->name, "autokill")) {
- if (sscanf(v->value, "%i", &x) == 1) {
+ if (sscanf(v->value, "%d", &x) == 1) {
if (x >= 0)
global_autokilltimeout = x;
else
@@ -4525,7 +4525,7 @@ static int set_config(char *config_file, struct sockaddr_in* sin)
else
ast_log(LOG_WARNING, "Invalid global endpoint identifier '%s' at line %d\n", v->value, v->lineno);
} else if (!strcasecmp(v->name, "tos")) {
- if (sscanf(v->value, "%i", &format) == 1)
+ if (sscanf(v->value, "%d", &format) == 1)
tos = format & 0xff;
else if (!strcasecmp(v->value, "lowdelay"))
tos = IPTOS_LOWDELAY;