aboutsummaryrefslogtreecommitdiffstats
path: root/apps
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 /apps
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 'apps')
-rwxr-xr-xapps/app_dial.c2
-rwxr-xr-xapps/app_disa.c4
-rwxr-xr-xapps/app_groupcount.c2
-rwxr-xr-xapps/app_meetme.c18
-rwxr-xr-xapps/app_osplookup.c4
-rwxr-xr-xapps/app_read.c2
-rwxr-xr-xapps/app_readfile.c2
-rwxr-xr-xapps/app_realtime.c2
-rwxr-xr-xapps/app_rpt.c2
-rwxr-xr-xapps/app_voicemail.c8
10 files changed, 23 insertions, 23 deletions
diff --git a/apps/app_dial.c b/apps/app_dial.c
index d5b46dfd1..6855ac33e 100755
--- a/apps/app_dial.c
+++ b/apps/app_dial.c
@@ -693,7 +693,7 @@ static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags
if ((cdl = strstr(transfer, "S("))) {
calldurationlimit=atoi(cdl+2);
if (option_verbose > 2)
- ast_verbose(VERBOSE_PREFIX_3 "Setting call duration limit to %i seconds.\n",calldurationlimit);
+ ast_verbose(VERBOSE_PREFIX_3 "Setting call duration limit to %d seconds.\n",calldurationlimit);
}
/* Extract DTMF strings to send upon successfull connect */
diff --git a/apps/app_disa.c b/apps/app_disa.c
index 0eaf468ec..ee5985649 100755
--- a/apps/app_disa.c
+++ b/apps/app_disa.c
@@ -143,8 +143,8 @@ static int disa_exec(struct ast_channel *chan, void *data)
ast_log(LOG_WARNING, "disa requires an argument (passcode/passcode file)\n");
return -1;
}
- ast_log(LOG_DEBUG, "Digittimeout: %i\n", digittimeout);
- ast_log(LOG_DEBUG, "Responsetimeout: %i\n", firstdigittimeout);
+ ast_log(LOG_DEBUG, "Digittimeout: %d\n", digittimeout);
+ ast_log(LOG_DEBUG, "Responsetimeout: %d\n", firstdigittimeout);
strncpy(tmp, (char *)data, sizeof(tmp)-1);
stringp=tmp;
strsep(&stringp, "|");
diff --git a/apps/app_groupcount.c b/apps/app_groupcount.c
index 2c6bacf00..f0c86c4d1 100755
--- a/apps/app_groupcount.c
+++ b/apps/app_groupcount.c
@@ -114,7 +114,7 @@ static int group_check_exec(struct ast_channel *chan, void *data)
ast_app_group_split_group(data, limit, sizeof(limit), category, sizeof(category));
- if ((sscanf(limit, "%i", &max) == 1) && (max > -1)) {
+ if ((sscanf(limit, "%d", &max) == 1) && (max > -1)) {
count = ast_app_group_get_count(pbx_builtin_getvar_helper(chan, category), category);
if (count > max) {
if (ast_exists_extension(chan, chan->context, chan->exten, chan->priority + 101, chan->cid.cid_num))
diff --git a/apps/app_meetme.c b/apps/app_meetme.c
index 35386f96a..2e8d3d0e1 100755
--- a/apps/app_meetme.c
+++ b/apps/app_meetme.c
@@ -464,7 +464,7 @@ static int conf_cmd(int fd, int argc, char **argv) {
/* Show all the users */
user = cnf->firstuser;
while(user) {
- ast_cli(fd, "User #: %i Channel: %s %s %s %s %s\n", user->user_no, user->chan->name, (user->userflags & CONFFLAG_ADMIN) ? "(Admin)" : "", (user->userflags & CONFFLAG_MONITOR) ? "(Listen only)" : "", (user->adminflags & ADMINFLAG_MUTED) ? "(Admn Muted)" : "", istalking(user->talking));
+ ast_cli(fd, "User #: %d Channel: %s %s %s %s %s\n", user->user_no, user->chan->name, (user->userflags & CONFFLAG_ADMIN) ? "(Admin)" : "", (user->userflags & CONFFLAG_MONITOR) ? "(Listen only)" : "", (user->adminflags & ADMINFLAG_MUTED) ? "(Admn Muted)" : "", istalking(user->talking));
user = user->nextuser;
}
ast_cli(fd,"%d users in that conference.\n",cnf->users);
@@ -535,7 +535,7 @@ static char *complete_confcmd(char *line, char *word, int pos, int state) {
/* Search for the user */
usr = cnf->firstuser;
while(usr) {
- snprintf(usrno, sizeof(usrno), "%i", usr->user_no);
+ snprintf(usrno, sizeof(usrno), "%d", usr->user_no);
if (!strncasecmp(word, usrno, strlen(word))) {
if (++which > state)
break;
@@ -839,7 +839,7 @@ zapretry:
"Channel: %s\r\n"
"Uniqueid: %s\r\n"
"Meetme: %s\r\n"
- "Usernum: %i\r\n",
+ "Usernum: %d\r\n",
chan->name, chan->uniqueid, conf->confno, user->user_no);
if (!firstpass && !(confflags & CONFFLAG_MONITOR) && !(confflags & CONFFLAG_ADMIN)) {
@@ -1047,7 +1047,7 @@ zapretry:
"Channel: %s\r\n"
"Uniqueid: %s\r\n"
"Meetme: %s\r\n"
- "Usernum: %i\r\n",
+ "Usernum: %d\r\n",
chan->name, chan->uniqueid, conf->confno, user->user_no);
}
if (user->talking && totalsilence > MEETME_DELAYDETECTENDTALK) {
@@ -1056,7 +1056,7 @@ zapretry:
"Channel: %s\r\n"
"Uniqueid: %s\r\n"
"Meetme: %s\r\n"
- "Usernum: %i\r\n",
+ "Usernum: %d\r\n",
chan->name, chan->uniqueid, conf->confno, user->user_no);
}
}
@@ -1273,7 +1273,7 @@ outrun:
"Channel: %s\r\n"
"Uniqueid: %s\r\n"
"Meetme: %s\r\n"
- "Usernum: %i\r\n",
+ "Usernum: %d\r\n",
chan->name, chan->uniqueid, conf->confno, user->user_no);
prev = NULL;
conf->users--;
@@ -1340,7 +1340,7 @@ outrun:
}
}
/* Return the number of seconds the user was in the conf */
- snprintf(meetmesecs, sizeof(meetmesecs), "%i", (int) (time(NULL) - user->jointime));
+ snprintf(meetmesecs, sizeof(meetmesecs), "%d", (int) (time(NULL) - user->jointime));
pbx_builtin_setvar_helper(chan, "MEETMESECS", meetmesecs);
}
free(user);
@@ -1451,7 +1451,7 @@ static int count_exec(struct ast_channel *chan, void *data)
if (localdata && !ast_strlen_zero(localdata)){
/* have var so load it and exit */
- snprintf(val,sizeof(val), "%i",count);
+ snprintf(val,sizeof(val), "%d",count);
pbx_builtin_setvar_helper(chan, localdata,val);
} else {
if (chan->_state != AST_STATE_UP)
@@ -1706,7 +1706,7 @@ static struct ast_conf_user* find_user(struct ast_conference *conf, char *caller
if (conf && callerident) {
user = conf->firstuser;
while(user) {
- snprintf(usrno, sizeof(usrno), "%i", user->user_no);
+ snprintf(usrno, sizeof(usrno), "%d", user->user_no);
if (strcmp(usrno, callerident) == 0)
return user;
user = user->nextuser;
diff --git a/apps/app_osplookup.c b/apps/app_osplookup.c
index 0c58dd63a..de08e4469 100755
--- a/apps/app_osplookup.c
+++ b/apps/app_osplookup.c
@@ -150,7 +150,7 @@ static int ospnext_exec(struct ast_channel *chan, void *data)
cause = str2cause((char *)data);
temp = pbx_builtin_getvar_helper(chan, "OSPHANDLE");
result.handle = -1;
- if (temp && strlen(temp) && (sscanf(temp, "%i", &result.handle) == 1) && (result.handle > -1)) {
+ if (temp && strlen(temp) && (sscanf(temp, "%d", &result.handle) == 1) && (result.handle > -1)) {
if ((res = ast_osp_next(&result, cause)) > 0) {
char tmp[80];
snprintf(tmp, sizeof(tmp), "%d", result.handle);
@@ -203,7 +203,7 @@ static int ospfinished_exec(struct ast_channel *chan, void *data)
cause = str2cause((char *)data);
temp = pbx_builtin_getvar_helper(chan, "OSPHANDLE");
result.handle = -1;
- if (temp && strlen(temp) && (sscanf(temp, "%i", &result.handle) == 1) && (result.handle > -1)) {
+ if (temp && strlen(temp) && (sscanf(temp, "%d", &result.handle) == 1) && (result.handle > -1)) {
if (!ast_osp_terminate(result.handle, cause, start, duration)) {
pbx_builtin_setvar_helper(chan, "_OSPHANDLE", "");
res = 1;
diff --git a/apps/app_read.c b/apps/app_read.c
index eaff923e9..d561c34d4 100755
--- a/apps/app_read.c
+++ b/apps/app_read.c
@@ -119,7 +119,7 @@ static int read_exec(struct ast_channel *chan, void *data)
if ((maxdigits<1) || (maxdigits>255)) {
maxdigits = 255;
} else if (option_verbose > 2)
- ast_verbose(VERBOSE_PREFIX_3 "Accepting a maximum of %i digits.\n", maxdigits);
+ ast_verbose(VERBOSE_PREFIX_3 "Accepting a maximum of %d digits.\n", maxdigits);
}
if (!(varname) || ast_strlen_zero(varname)) {
ast_log(LOG_WARNING, "Invalid! Usage: Read(variable[|filename][|maxdigits][|option][|attempts][|timeout])\n\n");
diff --git a/apps/app_readfile.c b/apps/app_readfile.c
index 92815472b..0cff0a327 100755
--- a/apps/app_readfile.c
+++ b/apps/app_readfile.c
@@ -78,7 +78,7 @@ static int readfile_exec(struct ast_channel *chan, void *data)
if(len < strlen(returnvar))
returnvar[len]='\0';
else
- ast_log(LOG_WARNING,"%s is longer than %i, and %i \n",file,len,strlen(returnvar));
+ ast_log(LOG_WARNING,"%s is longer than %d, and %d \n",file,len,strlen(returnvar));
}
pbx_builtin_setvar_helper(chan, varname, returnvar);
free(returnvar);
diff --git a/apps/app_realtime.c b/apps/app_realtime.c
index 7a1a63d4a..6ae64f5c4 100755
--- a/apps/app_realtime.c
+++ b/apps/app_realtime.c
@@ -87,7 +87,7 @@ static int cli_update_realtime(int fd, int argc, char **argv) {
return RESULT_SUCCESS;
}
- ast_cli(fd, "Updated %i RealTime record(s).\n", res);
+ ast_cli(fd, "Updated %d RealTime record(s).\n", res);
return RESULT_SUCCESS;
}
diff --git a/apps/app_rpt.c b/apps/app_rpt.c
index b04c8489b..2595bbbd7 100755
--- a/apps/app_rpt.c
+++ b/apps/app_rpt.c
@@ -347,7 +347,7 @@ static int myatoi(char *str)
int ret;
if (str == NULL) return -1;
- if (sscanf(str,"%i",&ret) != 1) return -1;
+ if (sscanf(str,"%d",&ret) != 1) return -1;
return ret;
}
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index fedfd1271..b3fb4f9cc 100755
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -859,7 +859,7 @@ static int last_message_index(char *dir)
SQLFreeHandle (SQL_HANDLE_STMT, stmt);
goto yuck;
}
- if (sscanf(rowdata, "%i", &x) != 1)
+ if (sscanf(rowdata, "%d", &x) != 1)
ast_log(LOG_WARNING, "Failed to read message count!\n");
SQLFreeHandle (SQL_HANDLE_STMT, stmt);
} else
@@ -920,7 +920,7 @@ static int message_exists(char *dir, int msgnum)
SQLFreeHandle (SQL_HANDLE_STMT, stmt);
goto yuck;
}
- if (sscanf(rowdata, "%i", &x) != 1)
+ if (sscanf(rowdata, "%d", &x) != 1)
ast_log(LOG_WARNING, "Failed to read message count!\n");
SQLFreeHandle (SQL_HANDLE_STMT, stmt);
} else
@@ -4072,7 +4072,7 @@ static int vm_newuser(struct ast_channel *chan, struct ast_vm_user *vmu, struct
vm_change_password(vmu,newpassword);
else
vm_change_password_shell(vmu,newpassword);
- ast_log(LOG_DEBUG,"User %s set password to %s of length %i\n",vms->username,newpassword,(int)strlen(newpassword));
+ ast_log(LOG_DEBUG,"User %s set password to %s of length %d\n",vms->username,newpassword,(int)strlen(newpassword));
cmd = ast_play_and_wait(chan,"vm-passchanged");
/* If forcename is set, have the user record their name */
@@ -4174,7 +4174,7 @@ static int vm_options(struct ast_channel *chan, struct ast_vm_user *vmu, struct
vm_change_password(vmu,newpassword);
else
vm_change_password_shell(vmu,newpassword);
- ast_log(LOG_DEBUG,"User %s set password to %s of length %i\n",vms->username,newpassword,(int)strlen(newpassword));
+ ast_log(LOG_DEBUG,"User %s set password to %s of length %d\n",vms->username,newpassword,(int)strlen(newpassword));
cmd = ast_play_and_wait(chan,"vm-passchanged");
break;
case '*':