diff options
author | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2002-06-21 01:40:13 +0000 |
---|---|---|
committer | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2002-06-21 01:40:13 +0000 |
commit | 87909fa28e55346e164f7c1ea3bec21aa9e1e01d (patch) | |
tree | eb3b9515fd164afd1e2242b99a26c047f8719bfe /formats | |
parent | 74d376fd3728d44299a0fa2a9c15cd8012cb1b47 (diff) |
Version 0.1.12 from FTP
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@465 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'formats')
-rwxr-xr-x | formats/format_jpeg.c | 2 | ||||
-rwxr-xr-x | formats/format_wav.c | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/formats/format_jpeg.c b/formats/format_jpeg.c index 7e10af884..4e9f0f4c3 100755 --- a/formats/format_jpeg.c +++ b/formats/format_jpeg.c @@ -80,7 +80,7 @@ static int jpeg_write_image(int fd, struct ast_frame *fr) if (fr->datalen) { res = write(fd, fr->data, fr->datalen); if (res != fr->datalen) { - ast_log(LOG_WARNING, "Only wrote %d of %d bytes: %s\n", res, fr->datalen); + ast_log(LOG_WARNING, "Only wrote %d of %d bytes: %s\n", res, fr->datalen, strerror(errno)); return -1; } } diff --git a/formats/format_wav.c b/formats/format_wav.c index 77ac71916..667f66f24 100755 --- a/formats/format_wav.c +++ b/formats/format_wav.c @@ -11,6 +11,7 @@ * the GNU General Public License */ +#include <asterisk/lock.h> #include <asterisk/channel.h> #include <asterisk/file.h> #include <asterisk/logger.h> @@ -51,7 +52,7 @@ struct ast_filestream { static struct ast_filestream *glist = NULL; -static pthread_mutex_t wav_lock = PTHREAD_MUTEX_INITIALIZER; +static pthread_mutex_t wav_lock = AST_MUTEX_INITIALIZER; static int glistcnt = 0; static char *name = "wav"; @@ -167,7 +168,7 @@ static int check_header(int fd) return -1; } if (read(fd, &bisam, 2) != 2) { - ast_log(LOG_WARNING, "Read failed (Bits Per Sample): &d\n", ltohs(bisam)); + ast_log(LOG_WARNING, "Read failed (Bits Per Sample): %d\n", ltohs(bisam)); return -1; } /* Begin data chunk */ |