[Asterisk-cvs] asterisk/channels chan_h323.c, 1.109,
1.110 chan_iax2.c, 1.275, 1.276 chan_mgcp.c, 1.116,
1.117 chan_phone.c, 1.50, 1.51 chan_sip.c, 1.709,
1.710 chan_skinny.c, 1.71, 1.72 chan_zap.c, 1.433,
1.434 iax2-provision.c, 1.10, 1.11
kpfleming at lists.digium.com
kpfleming at lists.digium.com
Fri Apr 29 12:11:00 CDT 2005
- Previous message: [Asterisk-cvs] asterisk/pbx pbx_config.c, 1.58, 1.59 pbx_dundi.c,
1.32, 1.33 pbx_loopback.c, 1.5, 1.6
- Next message: [Asterisk-cvs] asterisk/apps app_dial.c, 1.151, 1.152 app_disa.c,
1.26, 1.27 app_groupcount.c, 1.10, 1.11 app_meetme.c, 1.95,
1.96 app_osplookup.c, 1.6, 1.7 app_read.c, 1.17,
1.18 app_readfile.c, 1.2, 1.3 app_realtime.c, 1.8,
1.9 app_rpt.c, 1.30, 1.31 app_voicemail.c, 1.208, 1.209
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /usr/cvsroot/asterisk/channels
In directory mongoose.digium.com:/tmp/cvs-serv12635/channels
Modified Files:
chan_h323.c chan_iax2.c chan_mgcp.c chan_phone.c chan_sip.c
chan_skinny.c chan_zap.c iax2-provision.c
Log Message:
don't use '%i' at all, since we have no current use cases that need non base-10 parsing (bug #4110)
Index: chan_h323.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_h323.c,v
retrieving revision 1.109
retrieving revision 1.110
diff -u -d -r1.109 -r1.110
--- chan_h323.c 29 Apr 2005 04:22:47 -0000 1.109
+++ chan_h323.c 29 Apr 2005 17:00:33 -0000 1.110
@@ -1996,7 +1996,7 @@
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;
Index: chan_iax2.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_iax2.c,v
retrieving revision 1.275
retrieving revision 1.276
diff -u -d -r1.275 -r1.276
--- chan_iax2.c 28 Apr 2005 16:21:00 -0000 1.275
+++ chan_iax2.c 29 Apr 2005 17:00:33 -0000 1.276
@@ -8360,7 +8360,7 @@
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 @@
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;
Index: chan_mgcp.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_mgcp.c,v
retrieving revision 1.116
retrieving revision 1.117
diff -u -d -r1.116 -r1.117
--- chan_mgcp.c 21 Apr 2005 06:02:43 -0000 1.116
+++ chan_mgcp.c 29 Apr 2005 17:00:33 -0000 1.117
@@ -4132,7 +4132,7 @@
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 @@
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);
Index: chan_phone.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_phone.c,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -d -r1.50 -r1.51
--- chan_phone.c 21 Apr 2005 06:02:43 -0000 1.50
+++ chan_phone.c 29 Apr 2005 17:00:33 -0000 1.51
@@ -219,7 +219,7 @@
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;
Index: chan_sip.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_sip.c,v
retrieving revision 1.709
retrieving revision 1.710
diff -u -d -r1.709 -r1.710
--- chan_sip.c 27 Apr 2005 17:04:17 -0000 1.709
+++ chan_sip.c 29 Apr 2005 17:00:33 -0000 1.710
@@ -1630,7 +1630,7 @@
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 @@
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 @@
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 @@
{
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 @@
/* 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 @@
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 @@
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 @@
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 @@
} 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 @@
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);
Index: chan_skinny.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_skinny.c,v
retrieving revision 1.71
retrieving revision 1.72
diff -u -d -r1.71 -r1.72
--- chan_skinny.c 21 Apr 2005 06:02:44 -0000 1.71
+++ chan_skinny.c 29 Apr 2005 17:00:33 -0000 1.72
@@ -2888,7 +2888,7 @@
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);
Index: chan_zap.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_zap.c,v
retrieving revision 1.433
retrieving revision 1.434
diff -u -d -r1.433 -r1.434
--- chan_zap.c 29 Apr 2005 15:32:44 -0000 1.433
+++ chan_zap.c 29 Apr 2005 17:00:33 -0000 1.434
@@ -8331,7 +8331,7 @@
}
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 @@
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 @@
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 {
Index: iax2-provision.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/iax2-provision.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- iax2-provision.c 21 Apr 2005 06:02:44 -0000 1.10
+++ iax2-provision.c 29 Apr 2005 17:00:33 -0000 1.11
@@ -287,7 +287,7 @@
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 @@
} 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;
- Previous message: [Asterisk-cvs] asterisk/pbx pbx_config.c, 1.58, 1.59 pbx_dundi.c,
1.32, 1.33 pbx_loopback.c, 1.5, 1.6
- Next message: [Asterisk-cvs] asterisk/apps app_dial.c, 1.151, 1.152 app_disa.c,
1.26, 1.27 app_groupcount.c, 1.10, 1.11 app_meetme.c, 1.95,
1.96 app_osplookup.c, 1.6, 1.7 app_read.c, 1.17,
1.18 app_readfile.c, 1.2, 1.3 app_realtime.c, 1.8,
1.9 app_rpt.c, 1.30, 1.31 app_voicemail.c, 1.208, 1.209
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the svn-commits
mailing list