Various minor cleanups (bug #931)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2087 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Mark Spencer
2004-01-28 21:32:48 +00:00
parent c0eb1e6bfe
commit 695422d698
7 changed files with 19 additions and 14 deletions

View File

@@ -150,12 +150,12 @@ static int g729_write(struct ast_filestream *fs, struct ast_frame *f)
ast_log(LOG_WARNING, "Asked to write non-G729 frame (%d)!\n", f->subclass);
return -1;
}
if (f->datalen % 20) {
ast_log(LOG_WARNING, "Invalid data length, %d, should be multiple of 20\n", f->datalen);
if (f->datalen % 10) {
ast_log(LOG_WARNING, "Invalid data length, %d, should be multiple of 10\n", f->datalen);
return -1;
}
if ((res = write(fs->fd, f->data, f->datalen)) != f->datalen) {
ast_log(LOG_WARNING, "Bad write (%d/20): %s\n", res, strerror(errno));
ast_log(LOG_WARNING, "Bad write (%d/10): %s\n", res, strerror(errno));
return -1;
}
return 0;