From: Andreas Eversberg Date: Sun, 29 Mar 2009 11:09:59 +0000 (+0200) Subject: chan_lcr: fixed compile problems with newer versions of asterisk X-Git-Url: http://git.eversberg.eu/gitweb.cgi?p=lcr.git;a=commitdiff_plain;h=14a1adb4fc440ace98a8b9aef21a5d30f5d7fe6e chan_lcr: fixed compile problems with newer versions of asterisk --- diff --git a/README b/README index b0772c4..5da7a61 100644 --- a/README +++ b/README @@ -479,4 +479,4 @@ Changes after Version 1.4 release - Fixed Notification messages in NT-mode -> Notifications like diversions are now sent to terminal. - Added l1hold feature (requires new mISDN and mISDNuser). - +- chan_lcr: Fixed compile problem with newer versions. diff --git a/chan_lcr.c b/chan_lcr.c index b3c42cc..5c23337 100644 --- a/chan_lcr.c +++ b/chan_lcr.c @@ -129,6 +129,8 @@ it is called from ast_channel process which has already locked ast_channel. #define HAVE_ATTRIBUTE_always_inline 1 #define HAVE_ARPA_INET_H 1 #define HAVE_TIMERSUB 1 +#define HAVE_STRTOQ 1 +#define HAVE_INET_ATON 1 #include #ifdef LCR_FOR_ASTERISK @@ -503,7 +505,12 @@ void apply_opt(struct chan_call *call, char *data) ast_dsp_set_features(call->dsp, DSP_FEATURE_DTMF_DETECT| DSP_FEATURE_FAX_CNG_DETECT); #endif #ifdef LCR_FOR_ASTERISK + #ifdef DSP_FEATURE_DTMF_DETECT ast_dsp_set_features(call->dsp, DSP_FEATURE_DTMF_DETECT| DSP_FEATURE_FAX_DETECT); + #else + ast_dsp_set_features(call->dsp, DSP_FEATURE_DIGIT_DETECT| DSP_FEATURE_FAX_DETECT); + #endif + #endif if (!call->trans) #ifdef LCR_FOR_CALLWEAVER @@ -2107,7 +2114,7 @@ static int lcr_write(struct ast_channel *ast, struct ast_frame *f) return -1; } if (call->bchannel && f->samples) - bchannel_transmit(call->bchannel, (unsigned char *)f->data, f->samples); + bchannel_transmit(call->bchannel, *((unsigned char **)&(f->data)), f->samples); ast_mutex_unlock(&chan_lock); return 0; }