diff options
author | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-12-24 01:40:07 +0000 |
---|---|---|
committer | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-12-24 01:40:07 +0000 |
commit | 05c1466c552ff0085a191038e034030a3681d53e (patch) | |
tree | 5b80a7b0d9f29485a99055442adc6b277aa4357f /file.c | |
parent | 461f9cdb357b9dd51ed1072b61310424d0db22d6 (diff) |
Merge anthm's native MOH patch (bug #2639) he promises me he'll rid it of ast_flag_moh...
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@4552 f38db490-d61c-443f-a65b-d21fe96a405b
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, '/'); |