From d5930d1fe84a2e34289911f5bbd0b700fc2fb32a Mon Sep 17 00:00:00 2001 From: Mark Spencer Date: Mon, 13 May 2002 22:29:39 +0000 Subject: Version 0.1.12 from FTP git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@446 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- channels/chan_modem_aopen.c | 4 ++-- channels/chan_modem_bestdata.c | 4 ++-- channels/chan_modem_i4l.c | 12 +++++++----- 3 files changed, 11 insertions(+), 9 deletions(-) (limited to 'channels') diff --git a/channels/chan_modem_aopen.c b/channels/chan_modem_aopen.c index 80a1402f9..b832f8092 100755 --- a/channels/chan_modem_aopen.c +++ b/channels/chan_modem_aopen.c @@ -16,7 +16,7 @@ #include #include #include -#include +#include #include #include #include @@ -34,7 +34,7 @@ static char *breakcmd = "\0x10\0x03"; static char *desc = "A/Open (Rockwell Chipset) ITU-2 VoiceModem Driver"; int usecnt; -pthread_mutex_t usecnt_lock = PTHREAD_MUTEX_INITIALIZER; +pthread_mutex_t usecnt_lock = AST_MUTEX_INITIALIZER; static char *aopen_idents[] = { /* Identify A/Open Modem */ diff --git a/channels/chan_modem_bestdata.c b/channels/chan_modem_bestdata.c index a360e32fd..b9f56d3b1 100755 --- a/channels/chan_modem_bestdata.c +++ b/channels/chan_modem_bestdata.c @@ -17,7 +17,7 @@ #include #include #include -#include +#include #include #include #include @@ -38,7 +38,7 @@ static char *breakcmd = "\020!"; static char *desc = "BestData (Conexant V.90 Chipset) VoiceModem Driver"; int usecnt; -pthread_mutex_t usecnt_lock = PTHREAD_MUTEX_INITIALIZER; +pthread_mutex_t usecnt_lock = AST_MUTEX_INITIALIZER; static char *bestdata_idents[] = { /* Identify BestData Modem */ diff --git a/channels/chan_modem_i4l.c b/channels/chan_modem_i4l.c index b02757f6f..609fefffb 100755 --- a/channels/chan_modem_i4l.c +++ b/channels/chan_modem_i4l.c @@ -17,7 +17,7 @@ #include #include #include -#include +#include #include #include #include @@ -33,7 +33,7 @@ static char *breakcmd = "\0x10\0x14\0x10\0x3"; static char *desc = "ISDN4Linux Emulated Modem Driver"; int usecnt; -pthread_mutex_t usecnt_lock = PTHREAD_MUTEX_INITIALIZER; +pthread_mutex_t usecnt_lock = AST_MUTEX_INITIALIZER; static char *i4l_idents[] = { /* Identify ISDN4Linux Driver */ @@ -386,7 +386,7 @@ static struct ast_frame *i4l_read(struct ast_modem_pvt *p) static int i4l_write(struct ast_modem_pvt *p, struct ast_frame *f) { -#define MAX_WRITE_SIZE 512 +#define MAX_WRITE_SIZE 1024 unsigned char result[MAX_WRITE_SIZE << 1]; unsigned char b; int bpos=0, x; @@ -416,8 +416,10 @@ static int i4l_write(struct ast_modem_pvt *p, struct ast_frame *f) res = write(p->fd, result, bpos); #endif if (res < 1) { - ast_log(LOG_WARNING, "Failed to write buffer\n"); - return -1; + if (errno != EAGAIN) { + ast_log(LOG_WARNING, "Failed to write buffer\n"); + return -1; + } } #if 0 printf("Result of write is %d\n", res); -- cgit v1.2.3