[Asterisk-Dev] chan_modem_i4l (only noise is received,
reason for the problem)
David Arendt
admin at prnet.org
Sat Nov 5 04:39:35 MST 2005
Hi,
I had the problem with recent asterisk versions that chan_modem_i4l is
only receiving noise.
I decided to examine what leads to this problems an found the reason.
This patch was applied in cvs in order to fix some gcc4 compiler
warnings and has broken receiving.
Bye,
David Arendt
--- asterisk/channels/chan_modem_i4l.c 2005/06/24 02:15:04 1.29
+++ asterisk/channels/chan_modem_i4l.c 2005/08/05 16:29:30 1.30
@@ -21,7 +21,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION(__FILE__, "$Revision: 1.29 $")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision: 1.30 $")
#include "asterisk/lock.h"
#include "asterisk/vmodem.h"
@@ -316,7 +316,7 @@ static struct ast_frame *i4l_handle_esca
static struct ast_frame *i4l_read(struct ast_modem_pvt *p)
{
- unsigned char result[256];
+ char result[256];
short *b;
struct ast_frame *f=NULL;
int res;
@@ -426,7 +426,7 @@ static struct ast_frame *i4l_read(struct
if (!f)
return NULL;
} else {
- *(b++) = AST_MULAW(result[x]);
+ *(b++) = AST_MULAW((int)result[x]);
p->obuflen += 2;
}
}
More information about the asterisk-dev
mailing list