diff options
author | mnicholson <mnicholson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-11-30 21:36:06 +0000 |
---|---|---|
committer | mnicholson <mnicholson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-11-30 21:36:06 +0000 |
commit | 3b92f4cff79cd3d9cb76635c938a2a2a06f0d57d (patch) | |
tree | d606d0a15c9f6c24dbbd0014168f02ece577f24b /main/app.c | |
parent | bdc1b839df4f5800fb609fabaa2f6c3a70d4fbb7 (diff) |
Merged revisions 231688 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
................
r231688 | mnicholson | 2009-11-30 15:31:55 -0600 (Mon, 30 Nov 2009) | 15 lines
Merged revisions 231614 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r231614 | mnicholson | 2009-11-30 15:11:44 -0600 (Mon, 30 Nov 2009) | 8 lines
Remove duplicate entries from voicemail format lists. This prevents app_voicemail from entering an infinite loop when the same format is specified twice in the format list.
(closes issue #15625)
Reported by: Shagg63
Tested by: mnicholson
Review: https://reviewboard.asterisk.org/r/429/
........
................
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@231689 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/app.c')
-rw-r--r-- | main/app.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/main/app.c b/main/app.c index 14cabe026..2aa76edef 100644 --- a/main/app.c +++ b/main/app.c @@ -55,7 +55,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") AST_THREADSTORAGE_PUBLIC(ast_str_thread_global_buf); -#define MAX_OTHER_FORMATS 10 +#define AST_MAX_FORMATS 10 static AST_RWLIST_HEAD_STATIC(groups, ast_group_info); @@ -671,8 +671,8 @@ static int __ast_play_and_record(struct ast_channel *chan, const char *playfile, char *fmts; char comment[256]; int x, fmtcnt = 1, res = -1, outmsg = 0; - struct ast_filestream *others[MAX_OTHER_FORMATS]; - char *sfmt[MAX_OTHER_FORMATS]; + struct ast_filestream *others[AST_MAX_FORMATS]; + char *sfmt[AST_MAX_FORMATS]; char *stringp = NULL; time_t start, end; struct ast_dsp *sildet = NULL; /* silence detector dsp */ @@ -723,8 +723,8 @@ static int __ast_play_and_record(struct ast_channel *chan, const char *playfile, sfmt[0] = ast_strdupa(fmts); while ((fmt = strsep(&stringp, "|"))) { - if (fmtcnt > MAX_OTHER_FORMATS - 1) { - ast_log(LOG_WARNING, "Please increase MAX_OTHER_FORMATS in app.c\n"); + if (fmtcnt > AST_MAX_FORMATS - 1) { + ast_log(LOG_WARNING, "Please increase AST_MAX_FORMATS in file.h\n"); break; } sfmt[fmtcnt++] = ast_strdupa(fmt); @@ -911,7 +911,7 @@ static int __ast_play_and_record(struct ast_channel *chan, const char *playfile, } if (prepend && outmsg) { - struct ast_filestream *realfiles[MAX_OTHER_FORMATS]; + struct ast_filestream *realfiles[AST_MAX_FORMATS]; struct ast_frame *fr; for (x = 0; x < fmtcnt; x++) { |