From: Jaroslav Kysela Date: Tue, 20 Jun 2017 15:30:28 +0000 (+0200) Subject: satip server: don't print RTCP connection refused errors for broken (or non-capable... X-Git-Tag: v4.2.3~12 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2e3aff188ea6d11a7385998d226f6ef07b2774bb;p=thirdparty%2Ftvheadend.git satip server: don't print RTCP connection refused errors for broken (or non-capable) clients, fixes #4184 --- diff --git a/src/satip/rtp.c b/src/satip/rtp.c index 89b2f3b5d..5f48db7e3 100644 --- a/src/satip/rtp.c +++ b/src/satip/rtp.c @@ -56,6 +56,7 @@ typedef struct satip_rtp_session { int fd_rtcp; int frontend; int source; + int disable_rtcp; dvb_mux_conf_t dmc; mpegts_apids_t pids; TAILQ_HEAD(, satip_rtp_table) pmt_tables; @@ -880,7 +881,7 @@ satip_rtcp_thread(void *aux) } while (us > 0); pthread_mutex_lock(&satip_rtp_lock); TAILQ_FOREACH(rtp, &satip_rtp_sessions, link) { - if (rtp->sq == NULL) continue; + if (rtp->sq == NULL || rtp->disable_rtcp) continue; len = satip_rtcp_build(rtp, msg); if (len <= 0) continue; if (tvhtrace_enabled()) { @@ -899,9 +900,13 @@ satip_rtcp_thread(void *aux) } if (r < 0) { err = errno; - tcp_get_str_from_ip(&rtp->peer2, addrbuf, sizeof(addrbuf)); - tvhwarn(LS_SATIPS, "RTCP send to error %s:%d : %s", - addrbuf, ntohs(IP_PORT(rtp->peer2)), strerror(err)); + if (err != ECONNREFUSED) { + tcp_get_str_from_ip(&rtp->peer2, addrbuf, sizeof(addrbuf)); + tvhwarn(LS_SATIPS, "RTCP send to error %s:%d : %s", + addrbuf, ntohs(IP_PORT(rtp->peer2)), strerror(err)); + } else { + rtp->disable_rtcp = 1; + } } } pthread_mutex_unlock(&satip_rtp_lock);