diff options
Diffstat (limited to 'channels')
-rwxr-xr-x | channels/chan_h323.c | 2 | ||||
-rwxr-xr-x | channels/chan_iax2.c | 4 | ||||
-rwxr-xr-x | channels/chan_mgcp.c | 4 | ||||
-rwxr-xr-x | channels/chan_phone.c | 2 | ||||
-rwxr-xr-x | channels/chan_sip.c | 20 | ||||
-rwxr-xr-x | channels/chan_skinny.c | 2 | ||||
-rwxr-xr-x | channels/chan_zap.c | 6 | ||||
-rwxr-xr-x | channels/iax2-provision.c | 4 |
8 files changed, 22 insertions, 22 deletions
diff --git a/channels/chan_h323.c b/channels/chan_h323.c index d27e8169a..c14b0d4b1 100755 --- a/channels/chan_h323.c +++ b/channels/chan_h323.c @@ -1996,7 +1996,7 @@ int reload_config(void) else capability &= ~format; } else if (!strcasecmp(v->name, "tos")) { - if (sscanf(v->value, "%i", &format)) { + if (sscanf(v->value, "%d", &format)) { tos = format & 0xff; } else if (!strcasecmp(v->value, "lowdelay")) { tos = IPTOS_LOWDELAY; diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c index 50fcaeb43..d3740b6dd 100755 --- a/channels/chan_iax2.c +++ b/channels/chan_iax2.c @@ -8360,7 +8360,7 @@ static int set_config(char *config_file, int reload) if (trunkfreq < 10) trunkfreq = 10; } else if (!strcasecmp(v->name, "autokill")) { - if (sscanf(v->value, "%i", &x) == 1) { + if (sscanf(v->value, "%d", &x) == 1) { if (x >= 0) autokill = x; else @@ -8393,7 +8393,7 @@ static int set_config(char *config_file, int reload) if (!ast_context_find(regcontext)) ast_context_create(NULL, regcontext, channeltype); } 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; diff --git a/channels/chan_mgcp.c b/channels/chan_mgcp.c index 78f7d3749..0bddcafc7 100755 --- a/channels/chan_mgcp.c +++ b/channels/chan_mgcp.c @@ -4132,7 +4132,7 @@ static int reload_config(void) else capability &= ~format; } 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; @@ -4147,7 +4147,7 @@ static int reload_config(void) else ast_log(LOG_WARNING, "Invalid tos value at line %d, should be 'lowdelay', 'throughput', 'reliability', 'mincost', or 'none'\n", v->lineno); } else if (!strcasecmp(v->name, "port")) { - if (sscanf(v->value, "%i", &ourport) == 1) { + if (sscanf(v->value, "%d", &ourport) == 1) { bindaddr.sin_port = htons(ourport); } else { ast_log(LOG_WARNING, "Invalid port number '%s' at line %d of %s\n", v->value, v->lineno, config); diff --git a/channels/chan_phone.c b/channels/chan_phone.c index 20290aba0..dd8aa6501 100755 --- a/channels/chan_phone.c +++ b/channels/chan_phone.c @@ -219,7 +219,7 @@ static int phone_digit(struct ast_channel *ast, char digit) ast_log(LOG_WARNING, "Unknown digit '%c'\n", digit); return -1; } - ast_log(LOG_NOTICE, "Dialed %i\n", outdigit); + ast_log(LOG_NOTICE, "Dialed %d\n", outdigit); ioctl(p->fd, PHONE_PLAY_TONE, outdigit); p->lastformat = -1; return 0; diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 24cc457a6..8b620fbaa 100755 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -1630,7 +1630,7 @@ static int sip_call(struct ast_channel *ast, char *dest, int timeout) res = 0; ast_set_flag(p, SIP_OUTGOING); #ifdef OSP_SUPPORT - if (!osptoken || !osphandle || (sscanf(osphandle, "%i", &p->osphandle) != 1)) { + if (!osptoken || !osphandle || (sscanf(osphandle, "%d", &p->osphandle) != 1)) { /* Force Disable OSP support */ ast_log(LOG_DEBUG, "Disabling OSP support for this call. osptoken = %s, osphandle = %s\n", osptoken, osphandle); osptoken = NULL; @@ -3510,7 +3510,7 @@ static int __transmit_response(struct sip_pvt *p, char *msg, struct sip_request struct sip_request resp; int seqno = 0; - if (reliable && (sscanf(get_header(req, "CSeq"), "%i ", &seqno) != 1)) { + if (reliable && (sscanf(get_header(req, "CSeq"), "%d ", &seqno) != 1)) { ast_log(LOG_WARNING, "Unable to determine sequence number from '%s'\n", get_header(req, "CSeq")); return -1; } @@ -3574,7 +3574,7 @@ static int transmit_response_with_auth(struct sip_pvt *p, char *msg, struct sip_ char tmp[256]; int seqno = 0; - if (reliable && (sscanf(get_header(req, "CSeq"), "%i ", &seqno) != 1)) { + if (reliable && (sscanf(get_header(req, "CSeq"), "%d ", &seqno) != 1)) { ast_log(LOG_WARNING, "Unable to determine sequence number from '%s'\n", get_header(req, "CSeq")); return -1; } @@ -3825,7 +3825,7 @@ static int transmit_response_with_sdp(struct sip_pvt *p, char *msg, struct sip_r { struct sip_request resp; int seqno; - if (sscanf(get_header(req, "CSeq"), "%i ", &seqno) != 1) { + if (sscanf(get_header(req, "CSeq"), "%d ", &seqno) != 1) { ast_log(LOG_WARNING, "Unable to get seqno from '%s'\n", get_header(req, "CSeq")); return -1; } @@ -8858,7 +8858,7 @@ static int handle_request(struct sip_pvt *p, struct sip_request *req, struct soc /* Must have Cseq */ if (ast_strlen_zero(cmd) || ast_strlen_zero(cseq)) return -1; - if (sscanf(cseq, "%i%n", &seqno, &len) != 1) { + if (sscanf(cseq, "%d%n", &seqno, &len) != 1) { ast_log(LOG_DEBUG, "No seqno in '%s'\n", cmd); return -1; } @@ -8897,7 +8897,7 @@ static int handle_request(struct sip_pvt *p, struct sip_request *req, struct soc extract_uri(p, req); while(*e && (*e < 33)) e++; - if (sscanf(e, "%i %n", &respid, &len) != 1) { + if (sscanf(e, "%d %n", &respid, &len) != 1) { ast_log(LOG_WARNING, "Invalid response: '%s'\n", e); } else { handle_response(p, respid, e + len, req,ignore, seqno); @@ -10250,7 +10250,7 @@ static int reload_config(void) ast_log(LOG_WARNING, "Unable to locate host '%s'\n", v->value); } else if (!strcasecmp(v->name, "outboundproxyport")) { /* Port needs to be after IP */ - sscanf(v->value, "%i", &format); + sscanf(v->value, "%d", &format); outboundproxyip.sin_port = htons(format); } else if (!strcasecmp(v->name, "autocreatepeer")) { autocreatepeer = ast_true(v->value); @@ -10298,7 +10298,7 @@ static int reload_config(void) memcpy(&externip.sin_addr, hp->h_addr, sizeof(externip.sin_addr)); time(&externexpire); } else if (!strcasecmp(v->name, "externrefresh")) { - if (sscanf(v->value, "%i", &externrefresh) != 1) { + if (sscanf(v->value, "%d", &externrefresh) != 1) { ast_log(LOG_WARNING, "Invalid externrefresh value '%s', must be an integer >0 at line %d\n", v->value, v->lineno); externrefresh = 10; } @@ -10311,7 +10311,7 @@ static int reload_config(void) } else if (!strcasecmp(v->name, "recordhistory")) { recordhistory = ast_true(v->value); } 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; @@ -10326,7 +10326,7 @@ static int reload_config(void) else ast_log(LOG_WARNING, "Invalid tos value at line %d, should be 'lowdelay', 'throughput', 'reliability', 'mincost', or 'none'\n", v->lineno); } else if (!strcasecmp(v->name, "bindport")) { - if (sscanf(v->value, "%i", &ourport) == 1) { + if (sscanf(v->value, "%d", &ourport) == 1) { bindaddr.sin_port = htons(ourport); } else { ast_log(LOG_WARNING, "Invalid port number '%s' at line %d of %s\n", v->value, v->lineno, config); diff --git a/channels/chan_skinny.c b/channels/chan_skinny.c index bbb336c47..6b9f4b854 100755 --- a/channels/chan_skinny.c +++ b/channels/chan_skinny.c @@ -2888,7 +2888,7 @@ static int reload_config(void) else capability &= ~format; } else if (!strcasecmp(v->name, "port")) { - if (sscanf(v->value, "%i", &ourport) == 1) { + if (sscanf(v->value, "%d", &ourport) == 1) { bindaddr.sin_port = htons(ourport); } else { ast_log(LOG_WARNING, "Invalid port number '%s' at line %d of %s\n", v->value, v->lineno, config); diff --git a/channels/chan_zap.c b/channels/chan_zap.c index 09c7b1df7..946eac569 100755 --- a/channels/chan_zap.c +++ b/channels/chan_zap.c @@ -8331,7 +8331,7 @@ static void *pri_dchannel(void *vpri) } if (e->hangup.aoc_units > -1) if (option_verbose > 2) - ast_verbose(VERBOSE_PREFIX_3 "Channel %d/%d, span %d received AOC-E charging %i unit%s\n", + ast_verbose(VERBOSE_PREFIX_3 "Channel %d/%d, span %d received AOC-E charging %d unit%s\n", pri->pvts[chanpos]->logicalspan, pri->pvts[chanpos]->prioffset, pri->span, (int)e->hangup.aoc_units, (e->hangup.aoc_units == 1) ? "" : "s"); ast_mutex_unlock(&pri->pvts[chanpos]->lock); } else { @@ -8377,7 +8377,7 @@ static void *pri_dchannel(void *vpri) ast_verbose(VERBOSE_PREFIX_3 "Channel %d/%d, span %d got hangup request\n", PRI_SPAN(e->hangup.channel), PRI_CHANNEL(e->hangup.channel), pri->span); if (e->hangup.aoc_units > -1) if (option_verbose > 2) - ast_verbose(VERBOSE_PREFIX_3 "Channel %d/%d, span %d received AOC-E charging %i unit%s\n", + ast_verbose(VERBOSE_PREFIX_3 "Channel %d/%d, span %d received AOC-E charging %d unit%s\n", pri->pvts[chanpos]->logicalspan, pri->pvts[chanpos]->prioffset, pri->span, (int)e->hangup.aoc_units, (e->hangup.aoc_units == 1) ? "" : "s"); } else { pri_hangup(pri->pri, pri->pvts[chanpos]->call, e->hangup.cause); @@ -9771,7 +9771,7 @@ static int setup_zap(int reload) echocancel=128; } } else if (!strcasecmp(v->name, "echotraining")) { - if (sscanf(v->value, "%i", &y) == 1) { + if (sscanf(v->value, "%d", &y) == 1) { if ((y < 10) || (y > 4000)) { ast_log(LOG_WARNING, "Echo training time must be within the range of 10 to 2000 ms at line %d\n", v->lineno); } else { diff --git a/channels/iax2-provision.c b/channels/iax2-provision.c index 5feec89a7..f44dcba8c 100755 --- a/channels/iax2-provision.c +++ b/channels/iax2-provision.c @@ -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; |