]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
satip server: don't print RTCP connection refused errors for broken (or non-capable...
authorJaroslav Kysela <perex@perex.cz>
Tue, 20 Jun 2017 15:30:28 +0000 (17:30 +0200)
committerJaroslav Kysela <perex@perex.cz>
Thu, 22 Jun 2017 12:39:49 +0000 (14:39 +0200)
src/satip/rtp.c

index 89b2f3b5d2ca6049241387c2f8b209140bafb7a2..5f48db7e31ba98cfa9afac9fec69e8d9aa1387b8 100644 (file)
@@ -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);