diff options
author | Mark Spencer <markster@digium.com> | 2004-12-24 01:40:07 +0000 |
---|---|---|
committer | Mark Spencer <markster@digium.com> | 2004-12-24 01:40:07 +0000 |
commit | 713a2eb0721a06f10fe0b13d3123446675927f05 (patch) | |
tree | 5b80a7b0d9f29485a99055442adc6b277aa4357f /file.c | |
parent | f72f506f340b469ecfc9cf72a6890ec4d62f3d88 (diff) |
Merge anthm's native MOH patch (bug #2639) he promises me he'll rid it of ast_flag_moh...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@4552 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'file.c')
-rwxr-xr-x | file.c | 17 |
1 files changed, 12 insertions, 5 deletions
@@ -431,9 +431,13 @@ static int ast_filehelper(const char *filename, const char *filename2, const cha res = ret ? ret : -1; return res; } - struct ast_filestream *ast_openstream(struct ast_channel *chan, const char *filename, const char *preflang) { + return ast_openstream_full(chan, filename, preflang, 0); +} + +struct ast_filestream *ast_openstream_full(struct ast_channel *chan, const char *filename, const char *preflang, int asis) +{ /* This is a fairly complex routine. Essentially we should do the following: @@ -452,10 +456,13 @@ struct ast_filestream *ast_openstream(struct ast_channel *chan, const char *file char filename3[256]=""; char *endpart; int res; - ast_stopstream(chan); - /* do this first, otherwise we detect the wrong writeformat */ - if (chan->generator) - ast_deactivate_generator(chan); + + if (!asis) { + /* do this first, otherwise we detect the wrong writeformat */ + ast_stopstream(chan); + if (chan->generator) + ast_deactivate_generator(chan); + } if (preflang && !ast_strlen_zero(preflang)) { strncpy(filename3, filename, sizeof(filename3) - 1); endpart = strrchr(filename3, '/'); |