From 14da759465d6597908f27a31ec14eda3d5a47520 Mon Sep 17 00:00:00 2001 From: Birger Harzenetter Date: Sun, 24 Jun 2012 08:33:59 +0200 Subject: [PATCH] Changes needed for Asterisk TRUNK 357721 --- chan_lcr.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/chan_lcr.c b/chan_lcr.c index ef48739..a2951ae 100644 --- a/chan_lcr.c +++ b/chan_lcr.c @@ -161,8 +161,9 @@ it is called from ast_channel process which has already locked ast_channel. #include #include #include +#if ASTERISK_VERSION_NUM < 110000 #include - +#endif #include "extension.h" #include "message.h" #include "callerid.h" @@ -959,11 +960,12 @@ static void lcr_in_setup(struct chan_call *call, int message_type, union paramet #if ASTERISK_VERSION_NUM < 110000 ast->tech_pvt = call; ast->tech = &lcr_tech; + ast->fds[0] = call->pipe[0]; #else ast_channel_tech_pvt_set(ast, call); ast_channel_tech_set(ast, &lcr_tech); + ast_channel_set_fd(ast, 0, call->pipe[0]); #endif - ast->fds[0] = call->pipe[0]; /* fill setup information */ if (param->setup.dialinginfo.id) @@ -2179,10 +2181,11 @@ struct ast_channel *lcr_request(const char *type, int format, void *data, int *c call->ast = ast; #if ASTERISK_VERSION_NUM < 110000 ast->tech_pvt = call; + ast->fds[0] = call->pipe[0]; #else ast_channel_tech_pvt_set(ast, call); + ast_channel_set_fd(ast, 0, call->pipe[0]); #endif - ast->fds[0] = call->pipe[0]; call->pbx_started = 0; /* set state */ call->state = CHAN_LCR_STATE_OUT_PREPARE; @@ -2731,10 +2734,11 @@ static int lcr_hangup(struct ast_channel *ast) /* disconnect asterisk, maybe not required */ #if ASTERISK_VERSION_NUM < 110000 ast->tech_pvt = NULL; + ast->fds[0] = -1; #else ast_channel_tech_pvt_set(ast, NULL); + ast_channel_set_fd(ast, 0, -1); #endif - ast->fds[0] = -1; if (call->ref) { /* release */ CDEBUG(call, ast, "Releasing ref and freeing call instance.\n"); -- 2.13.6