diff options
author | seanbright <seanbright@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-08-10 14:45:25 +0000 |
---|---|---|
committer | seanbright <seanbright@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-08-10 14:45:25 +0000 |
commit | 842faddb76b6fbcbd623292bf1656d76eb22f3a7 (patch) | |
tree | 9d240f929d1efd30035a0505db16ba0f8e1ca439 /apps/app_record.c | |
parent | 1013afa1ad09d854207d24d3aed691321fecc100 (diff) |
More RSW merges. Everything from apps/ except for the big offenders
app_voicemail and app_queue.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@137055 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_record.c')
-rw-r--r-- | apps/app_record.c | 10 |
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); |