From 685e567bac089dea4488649789e528732ddc5baf Mon Sep 17 00:00:00 2001 From: Andreas Eversberg Date: Fri, 16 Mar 2012 08:14:23 +0100 Subject: Fixed problem of mute audio on some calls When reading from RTP socket, the first read() may fail right after connecting to remote socket. Subsequent read() will work as it should. I have not checked why this read fails, but I don't see any reason why we should stop reading, just because one read() fails at the beginning. --- openbsc/src/libtrau/rtp_proxy.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/openbsc/src/libtrau/rtp_proxy.c b/openbsc/src/libtrau/rtp_proxy.c index 92086ed1f..7d6375e55 100644 --- a/openbsc/src/libtrau/rtp_proxy.c +++ b/openbsc/src/libtrau/rtp_proxy.c @@ -484,10 +484,8 @@ static int rtp_socket_read(struct rtp_socket *rs, struct rtp_sub_socket *rss) return -ENOMEM; rc = read(rss->bfd.fd, msg->data, RTP_ALLOC_SIZE); - if (rc <= 0) { - rss->bfd.when &= ~BSC_FD_READ; + if (rc <= 0) return rc; - } msgb_put(msg, rc); -- cgit v1.2.3