- fixed an issue with RTP timeouts (on calls with multiple

media streams an timeout on one single stream would
  cancel all streams in the end. Seen with X-Lite UAs)
This commit is contained in:
Thomas Ries 2009-01-24 16:39:45 +00:00
parent 5c8a95e8c3
commit 3ed238394c
2 changed files with 12 additions and 4 deletions

View File

@ -1,5 +1,8 @@
0.7.2
=====
24-Jan-2009: - fixed an issue with RTP timeouts (on calls with multiple
media streams an timeout on one single stream would
cancel all streams in the end. Seen with X-Lite UAs)
07-Jan-2009: - fixed some senseless range checks on "Max-Forward"
and "Expires" headers (Thank you Alex for telling me)
08-Nov-2008: - check & define if SOL_IP not existing (some *BSDs)

View File

@ -355,7 +355,9 @@ static void *rtpproxy_main(void *arg) {
/* if sendto() fails with bad filedescriptor,
* this means that the opposite stream has been
* canceled or timed out.
* we should then cancel this stream as well.*/
* we should then cancel this stream as well.
* But only this specific media stream and not all
* active media streams in this ongoing call! */
WARN("stopping opposite stream");
callid.number=rtp_proxytable[i].callid_number;
@ -363,7 +365,8 @@ static void *rtpproxy_main(void *arg) {
/* don't lock the mutex, as we own the lock already */
sts = rtp_relay_stop_fwd(&callid,
rtp_proxytable[i].direction,
-1, NOLOCK_FDSET);
rtp_proxytable[i].media_stream_no,
NOLOCK_FDSET);
if (sts != STS_SUCCESS) {
/* force the streams to timeout on next occasion */
rtp_proxytable[i].timestamp=0;
@ -394,7 +397,8 @@ static void *rtpproxy_main(void *arg) {
/* don't lock the mutex, as we own the lock already */
sts = rtp_relay_stop_fwd(&callid,
rtp_proxytable[i].direction,
-1, NOLOCK_FDSET);
rtp_proxytable[i].media_stream_no,
NOLOCK_FDSET);
if (sts != STS_SUCCESS) {
/* force the streams to timeout on next occasion */
rtp_proxytable[i].timestamp=0;
@ -404,8 +408,9 @@ static void *rtpproxy_main(void *arg) {
#endif
}
} /* count > 0 */
/* update timestamp of last usage for both (RX and TX) entries.
* This allows silence (no data) on one stream without breaking
* This allows silence (no data) on one direction without breaking
* the connection after the RTP timeout */
rtp_proxytable[i].timestamp=current_tv.tv_sec;
if (rtp_proxytable[i].opposite_entry > 0) {