- adapted to latest asterisk bridge function prototype.

This commit is contained in:
MelwareDE 2005-11-15 14:10:51 +00:00
parent 4b394c2f7a
commit 43b15cd14a
2 changed files with 18 additions and 4 deletions

View File

@ -1340,7 +1340,11 @@ static int line_interconnect(struct ast_capi_pvt *i0, struct ast_capi_pvt *i1, i
*/
static CC_BRIDGE_RETURN capi_bridge(struct ast_channel *c0,
struct ast_channel *c1,
int flags, struct ast_frame **fo, struct ast_channel **rc)
int flags, struct ast_frame **fo, struct ast_channel **rc
#ifdef CC_AST_BRIDGE_WITH_TIMEOUTMS
, int timeoutms
#endif
)
{
struct ast_capi_pvt *i0 = CC_AST_CHANNEL_PVT(c0);
struct ast_capi_pvt *i1 = CC_AST_CHANNEL_PVT(c1);
@ -1378,12 +1382,14 @@ static CC_BRIDGE_RETURN capi_bridge(struct ast_channel *c0,
struct ast_channel *c0_priority[2] = {c0, c1};
struct ast_channel *c1_priority[2] = {c1, c0};
int priority = 0;
int to;
struct ast_frame *f;
struct ast_channel *who;
#ifndef CC_AST_BRIDGE_WITH_TIMEOUTMS
int timeoutms;
to = -1;
who = ast_waitfor_n(priority ? c0_priority : c1_priority, 2, &to);
timeoutms = -1;
#endif
who = ast_waitfor_n(priority ? c0_priority : c1_priority, 2, &timeoutms);
if (!who) {
ast_log(LOG_DEBUG, "Ooh, empty read...\n");
continue;

View File

@ -58,6 +58,14 @@ else
echo " * no 'ast_bridge_result'"
fi
if grep -q "struct ast_channel \*\*rc, int timeoutms" $INCLUDEDIR/channel.h; then
echo "#define CC_AST_BRIDGE_WITH_TIMEOUTMS" >>$CONFIGFILE
echo " * found bridge with timeoutms"
else
echo "#undef CC_AST_BRIDGE_WITH_TIMEOUTMS" >>$CONFIGFILE
echo " * no timeoutms in bridge"
fi
if grep -q "ast_dsp_process*needlock" $INCLUDEDIR/dsp.h; then
echo "#define CC_AST_DSP_PROCESS_NEEDLOCK" >>$CONFIGFILE
echo " * ast_dsp_process() needs 'needlock'"