summaryrefslogtreecommitdiff
path: root/apps/app_record.c
diff options
context:
space:
mode:
authorSean Bright <sean@malleable.com>2008-08-10 14:45:25 +0000
committerSean Bright <sean@malleable.com>2008-08-10 14:45:25 +0000
commit3ffb39833b25a02108214d7584733bc6b9c334df (patch)
tree9d240f929d1efd30035a0505db16ba0f8e1ca439 /apps/app_record.c
parent357bf3e90be71578e0b32303c41c5d29f2714c2b (diff)
More RSW merges. Everything from apps/ except for the big offenders
app_voicemail and app_queue. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@137055 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps/app_record.c')
-rw-r--r--apps/app_record.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/apps/app_record.c b/apps/app_record.c
index b062011a9..8afafc93d 100644
--- a/apps/app_record.c
+++ b/apps/app_record.c
@@ -173,7 +173,7 @@ static int record_exec(struct ast_channel *chan, void *data)
);
char *tmp2 = ast_strdupa(args.filename);
char countstring[15];
- int i;
+ int idx;
/* Separate each piece out by the format specifier */
AST_NONSTANDARD_APP_ARGS(fname, tmp2, '%');
@@ -182,8 +182,8 @@ static int record_exec(struct ast_channel *chan, void *data)
/* First piece has no leading percent, so it's copied verbatim */
ast_copy_string(tmp, fname.piece[0], sizeof(tmp));
tmplen = strlen(tmp);
- for (i = 1; i < fname.argc; i++) {
- if (fname.piece[i][0] == 'd') {
+ for (idx = 1; idx < fname.argc; idx++) {
+ if (fname.piece[idx][0] == 'd') {
/* Substitute the count */
snprintf(countstring, sizeof(countstring), "%d", count);
ast_copy_string(tmp + tmplen, countstring, sizeof(tmp) - tmplen);
@@ -191,10 +191,10 @@ static int record_exec(struct ast_channel *chan, void *data)
} else if (tmplen + 2 < sizeof(tmp)) {
/* Unknown format specifier - just copy it verbatim */
tmp[tmplen++] = '%';
- tmp[tmplen++] = fname.piece[i][0];
+ tmp[tmplen++] = fname.piece[idx][0];
}
/* Copy the remaining portion of the piece */
- ast_copy_string(tmp + tmplen, &(fname.piece[i][1]), sizeof(tmp) - tmplen);
+ ast_copy_string(tmp + tmplen, &(fname.piece[idx][1]), sizeof(tmp) - tmplen);
}
count++;
} while (ast_fileexists(tmp, ext, chan->language) > 0);