mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-17 18:19:45 +00:00
Version 0.1.12 from FTP
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@465 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
@@ -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 */
|
||||
|
Reference in New Issue
Block a user