summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2012-03-16 08:14:23 +0100
committerAndreas Eversberg <jolly@eversberg.eu>2013-07-29 12:34:18 +0200
commit685e567bac089dea4488649789e528732ddc5baf (patch)
treed073eb9d899dfa28c9e53d9e80ad6876d692c99e
parentdbddc8877c58bfdcd287d1af3228582d3800ac0c (diff)
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.
-rw-r--r--openbsc/src/libtrau/rtp_proxy.c4
1 files changed, 1 insertions, 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);