summaryrefslogtreecommitdiff
path: root/file.c
diff options
context:
space:
mode:
authorMark Spencer <markster@digium.com>2002-09-03 21:55:10 +0000
committerMark Spencer <markster@digium.com>2002-09-03 21:55:10 +0000
commit1681e18ce8f515defc76b4e459da6628cf4cc3b0 (patch)
tree7848a93bf0c1b53c90d1ee8eb10b9ef565e600a1 /file.c
parentb26b0e9529aa45e72b8a605cc6f92c6f2cb1dbc5 (diff)
Version 0.2.0 from FTP
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@515 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'file.c')
-rwxr-xr-xfile.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/file.c b/file.c
index 2fa223e69..7ac47aa5c 100755
--- a/file.c
+++ b/file.c
@@ -184,9 +184,12 @@ int ast_writestream(struct ast_filestream *fs, struct ast_frame *f)
res = 0;
/* Get the translated frame but don't consume the original in case they're using it on another stream */
trf = ast_translate(fs->trans, f, 0);
- res = fs->fmt->write(fs, trf);
- if (res)
- ast_log(LOG_WARNING, "Translated frame write failed\n");
+ if (trf) {
+ res = fs->fmt->write(fs, trf);
+ if (res)
+ ast_log(LOG_WARNING, "Translated frame write failed\n");
+ } else
+ res = 0;
}
return res;
}
@@ -547,6 +550,6 @@ char ast_waitstream(struct ast_channel *c, char *breakon)
}
- return (c->softhangup ? -1 : 0);
+ return (c->_softhangup ? -1 : 0);
}