From 50df20964fa2b45f6b6f971a488eb62074613980 Mon Sep 17 00:00:00 2001 From: MelwareDE Date: Fri, 2 Mar 2012 22:36:08 +0000 Subject: [PATCH] Do not access channel->fds directly, use ast_channel_set_fd if available --- chan_capi.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/chan_capi.c b/chan_capi.c index df6bfc2..751ff8d 100644 --- a/chan_capi.c +++ b/chan_capi.c @@ -2388,7 +2388,12 @@ static struct ast_channel *capi_new(struct capi_pvt *i, int state, const char *l ast_channel_release(tmp); return NULL; } + +#ifdef CC_AST_HAS_VERSION_1_6 + ast_channel_set_fd(tmp, 0, i->readerfd); +#else tmp->fds[0] = i->readerfd; +#endif if (i->smoother != NULL) { ast_smoother_reset(i->smoother, CAPI_MAX_B3_BLOCK_SIZE);