aboutsummaryrefslogtreecommitdiffstats
path: root/main/file.c
diff options
context:
space:
mode:
authorkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2009-03-18 01:51:21 +0000
committerkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2009-03-18 01:51:21 +0000
commitd3323c9c37e93007eae9df8b25a174fc9cbcbbfa (patch)
tree44c03bd656930ad4b36b921854685fd0ab516452 /main/file.c
parente9def2b3fb87a25a2fdbed138f1a5331ff1b08d9 (diff)
revert commit that included extranous changes
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@182807 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/file.c')
-rw-r--r--main/file.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/main/file.c b/main/file.c
index 43a7030f7..faca5a9be 100644
--- a/main/file.c
+++ b/main/file.c
@@ -203,20 +203,14 @@ int ast_writestream(struct ast_filestream *fs, struct ast_frame *f)
struct ast_frame *trf;
fs->lastwriteformat = f->subclass;
/* Get the translated frame but don't consume the original in case they're using it on another stream */
- if ((trf = ast_translate(fs->trans, f, 0))) {
- struct ast_frame *cur;
-
- /* the translator may have returned multiple frames, so process them */
- for (cur = trf; cur; cur = AST_LIST_NEXT(cur, frame_list)) {
- if ((res = fs->fmt->write(fs, trf))) {
- ast_log(LOG_WARNING, "Translated frame write failed\n");
- break;
- }
- }
+ trf = ast_translate(fs->trans, f, 0);
+ if (trf) {
+ res = fs->fmt->write(fs, trf);
ast_frfree(trf);
- } else {
+ if (res)
+ ast_log(LOG_WARNING, "Translated frame write failed\n");
+ } else
res = 0;
- }
}
}
return res;