diff options
author | Andreas Eversberg <jolly@eversberg.eu> | 2012-03-16 08:14:23 +0100 |
---|---|---|
committer | Andreas Eversberg <jolly@eversberg.eu> | 2013-07-29 12:34:18 +0200 |
commit | 685e567bac089dea4488649789e528732ddc5baf (patch) | |
tree | d073eb9d899dfa28c9e53d9e80ad6876d692c99e /openbsc | |
parent | dbddc8877c58bfdcd287d1af3228582d3800ac0c (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.
Diffstat (limited to 'openbsc')
-rw-r--r-- | openbsc/src/libtrau/rtp_proxy.c | 4 |
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); |