From: Jaroslav Kysela Date: Thu, 3 Aug 2017 07:00:48 +0000 (+0200) Subject: satip server: RTP handle more TCP errors, fixes #4226 X-Git-Tag: v4.2.4~67 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=431e28e608f64e1143846393ff476582508a4a16;p=thirdparty%2Ftvheadend.git satip server: RTP handle more TCP errors, fixes #4226 From: Mono Polimorph --- diff --git a/src/satip/rtp.c b/src/satip/rtp.c index 0cdc82ebc..5679f7ade 100644 --- a/src/satip/rtp.c +++ b/src/satip/rtp.c @@ -282,7 +282,7 @@ static inline int satip_rtp_flush_tcp_data(satip_rtp_session_t *rtp) { struct iovec *v = &rtp->tcp_data; - int r; + int r = 0; if (v->iov_len) r = satip_rtp_tcp_data(rtp, 0, v->iov_base, v->iov_len); @@ -382,13 +382,13 @@ satip_rtp_thread(void *aux) sm = TAILQ_FIRST(&sq->sq_queue); if (sm == NULL) { if (tcp) { - satip_rtp_flush_tcp_data(rtp); + r = satip_rtp_flush_tcp_data(rtp); } else { r = satip_rtp_send(rtp); - if (r) { - fatal = 1; - continue; - } + } + if (r) { + fatal = 1; + continue; } tvh_cond_wait(&sq->sq_cond, &sq->sq_mutex); continue;