chan_lcr hopefully now compiles against SVN version of asterisk.
[lcr.git] / chan_lcr.c
index acc485d..c1d3745 100644 (file)
@@ -121,6 +121,12 @@ it is called from ast_channel process which has already locked ast_channel.
 
 #include <semaphore.h>
 
+#define HAVE_ATTRIBUTE_always_inline 1
+#define HAVE_ARPA_INET_H 1
+#define HAVE_TIMERSUB 1
+
+#include <asterisk/compiler.h>
+#include <asterisk/buildopts.h>
 #include <asterisk/module.h>
 #include <asterisk/channel.h>
 #include <asterisk/config.h>
@@ -1989,7 +1995,7 @@ static int lcr_write(struct ast_channel *ast, struct ast_frame *f)
                return -1;
        }
        if (call->bchannel && f->samples)
-               bchannel_transmit(call->bchannel, f->data, f->samples);
+               bchannel_transmit(call->bchannel, (unsigned char *)f->data, f->samples);
        ast_mutex_unlock(&chan_lock);
        return 0;
 }
@@ -2029,7 +2035,7 @@ static struct ast_frame *lcr_read(struct ast_channel *ast)
        call->read_fr.datalen = len;
        call->read_fr.samples = len;
        call->read_fr.delivery = ast_tv(0,0);
-       call->read_fr.data = call->read_buff;
+       (unsigned char *)call->read_fr.data = call->read_buff;
        ast_mutex_unlock(&chan_lock);
 
        return &call->read_fr;
@@ -2356,20 +2362,21 @@ enum ast_bridge_result lcr_bridge(struct ast_channel *ast1,
 }
 static struct ast_channel_tech lcr_tech = {
        .type="LCR",
-       .description="Channel driver for connecting to Linux-Call-Router",
-       .requester=lcr_request,
-       .send_digit_begin=lcr_digit_begin,
-       .send_digit_end=lcr_digit_end,
-       .call=lcr_call,
-       .bridge=lcr_bridge, 
-       .hangup=lcr_hangup,
-       .answer=lcr_answer,
-       .read=lcr_read,
-       .write=lcr_write,
-       .indicate=lcr_indicate,
-       .fixup=lcr_fixup,
-       .send_text=lcr_send_text,
-       .properties=0
+       .description = "Channel driver for connecting to Linux-Call-Router",
+       .capabilities = AST_FORMAT_ALAW,
+       .requester = lcr_request,
+       .send_digit_begin = lcr_digit_begin,
+       .send_digit_end = lcr_digit_end,
+       .call = lcr_call,
+       .bridge = lcr_bridge, 
+       .hangup = lcr_hangup,
+       .answer = lcr_answer,
+       .read = lcr_read,
+       .write = lcr_write,
+       .indicate = lcr_indicate,
+       .fixup = lcr_fixup,
+       .send_text = lcr_send_text,
+       .properties = 0
 };