From f8343b33e55b5e0d5565e00123c20378e9fc30e5 Mon Sep 17 00:00:00 2001 From: Thomas Ries Date: Wed, 11 Feb 2009 21:28:52 +0000 Subject: [PATCH] - Don't abort RTP streams on ENOBUFS (Internet upstream saturated and a Packet is dropped) - Bulding on OpenBSD (missing header) --- ChangeLog | 2 ++ src/plugin_defaulttarget.c | 1 + src/plugin_demo.c | 1 + src/plugin_fix_bogus_via.c | 1 + src/plugin_logcall.c | 1 + src/plugin_shortdial.c | 2 ++ src/plugins.c | 1 + src/rtpproxy_relay.c | 10 ++++++++-- 8 files changed, 17 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 48a4dab..6e01045 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 0.7.2 ===== + 11-Feb-2009: - Don't abort RTP streams on ENOBUFS (Internet upstream + saturated and a Packet is dropped) 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) diff --git a/src/plugin_defaulttarget.c b/src/plugin_defaulttarget.c index 5349ffc..7d39d7c 100644 --- a/src/plugin_defaulttarget.c +++ b/src/plugin_defaulttarget.c @@ -22,6 +22,7 @@ #include +#include #include #include diff --git a/src/plugin_demo.c b/src/plugin_demo.c index 808202c..c628fa2 100644 --- a/src/plugin_demo.c +++ b/src/plugin_demo.c @@ -22,6 +22,7 @@ #include +#include #include #include diff --git a/src/plugin_fix_bogus_via.c b/src/plugin_fix_bogus_via.c index 285a842..cc867f2 100644 --- a/src/plugin_fix_bogus_via.c +++ b/src/plugin_fix_bogus_via.c @@ -22,6 +22,7 @@ #include +#include #include #include diff --git a/src/plugin_logcall.c b/src/plugin_logcall.c index 9e3abbf..fbe2943 100644 --- a/src/plugin_logcall.c +++ b/src/plugin_logcall.c @@ -22,6 +22,7 @@ #include +#include #include #include diff --git a/src/plugin_shortdial.c b/src/plugin_shortdial.c index 19f72ca..7ddf717 100644 --- a/src/plugin_shortdial.c +++ b/src/plugin_shortdial.c @@ -23,6 +23,8 @@ #include #include #include + +#include #include #include diff --git a/src/plugins.c b/src/plugins.c index 1b14824..62225e7 100644 --- a/src/plugins.c +++ b/src/plugins.c @@ -20,6 +20,7 @@ #include "config.h" +#include #include #include diff --git a/src/rtpproxy_relay.c b/src/rtpproxy_relay.c index 2b01188..19230b6 100644 --- a/src/rtpproxy_relay.c +++ b/src/rtpproxy_relay.c @@ -345,7 +345,10 @@ static void *rtpproxy_main(void *arg) { count, 0, (const struct sockaddr *)&dst_addr, (socklen_t)sizeof(dst_addr)); if (sts == -1) { - if (errno != ECONNREFUSED) { + /* ECONNREFUSED: Got ICMP destination unreachable + * ENOBUFS: Full TX queue, packet dropped (FreeBSD for example) + */ + if ((errno != ECONNREFUSED) && (errno != ENOBUFS)){ osip_call_id_t callid; ERROR("sendto() [%s:%i size=%i] call failed: %s", @@ -379,7 +382,10 @@ static void *rtpproxy_main(void *arg) { count, 0, (const struct sockaddr *)&dst_addr, (socklen_t)sizeof(dst_addr)); if (sts == -1) { - if (errno != ECONNREFUSED) { + /* ECONNREFUSED: Got ICMP destination unreachable + * ENOBUFS: Full TX queue, packet dropped (FreeBSD for example) + */ + if ((errno != ECONNREFUSED) && (errno != ENOBUFS)){ osip_call_id_t callid; ERROR("sendto() [%s:%i size=%i] call failed: %s",