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
This commit is contained in:
Sean Bright
2008-08-10 14:45:25 +00:00
parent 357bf3e90b
commit 3ffb39833b
18 changed files with 211 additions and 213 deletions

View File

@@ -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);