From 2bb859e2b4a1f56f182388041bc9a99c9cae568b Mon Sep 17 00:00:00 2001 From: Stefan Knoblich Date: Mon, 7 Jan 2013 18:04:00 +0100 Subject: [PATCH] ftmod_misdn: Fix brown paperbag logic bug in handle_b_channel_event() Yeah, right, discard the incoming audio data when the b-channel is active... Reverse the check, so ftdm_read() on an active mISDN b-channel will be able to read audio data from the RX socketpair and not kill the call from repeatedly timing out in poll(). Fixes: [WARNING] mod_freetdm.c:775 Too many timeouts while waiting I/O in channel FreeTDM/1:1/XX device 1:1! [ERR] mod_freetdm.c:820 clearing IO in channel FreeTDM/1:1/XX device 1:1! Signed-off-by: Stefan Knoblich --- libs/freetdm/src/ftmod/ftmod_misdn/ftmod_misdn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/freetdm/src/ftmod/ftmod_misdn/ftmod_misdn.c b/libs/freetdm/src/ftmod/ftmod_misdn/ftmod_misdn.c index 82a35ad7e6..784bc55c5c 100644 --- a/libs/freetdm/src/ftmod/ftmod_misdn/ftmod_misdn.c +++ b/libs/freetdm/src/ftmod/ftmod_misdn/ftmod_misdn.c @@ -2298,7 +2298,7 @@ static ftdm_status_t handle_b_channel_event(ftdm_channel_t *chan) char *data = buf + MISDN_HEADER_LEN; /* Discard incoming audio if not active */ - if (!priv->active) { + if (priv->active) { /* Convert audio data */ misdn_convert_audio_bits(data, datalen);