Bug #4226 » SATIP_Fixes_RTCP_errors_with_RTP_over_TCP.diff.txt
1 |
diff --git a/src/satip/rtp.c b/src/satip/rtp.c |
---|---|
2 |
index 0cdc82e..5679f7a 100644 |
3 |
--- a/src/satip/rtp.c |
4 |
+++ b/src/satip/rtp.c |
5 |
@@ -282,7 +282,7 @@ static inline int |
6 |
satip_rtp_flush_tcp_data(satip_rtp_session_t *rtp) |
7 |
{ |
8 |
struct iovec *v = &rtp->tcp_data; |
9 |
- int r; |
10 |
+ int r = 0; |
11 |
|
12 |
if (v->iov_len) |
13 |
r = satip_rtp_tcp_data(rtp, 0, v->iov_base, v->iov_len); |
14 |
@@ -382,13 +382,13 @@ satip_rtp_thread(void *aux) |
15 |
sm = TAILQ_FIRST(&sq->sq_queue); |
16 |
if (sm == NULL) { |
17 |
if (tcp) { |
18 |
- satip_rtp_flush_tcp_data(rtp); |
19 |
+ r = satip_rtp_flush_tcp_data(rtp); |
20 |
} else { |
21 |
r = satip_rtp_send(rtp); |
22 |
- if (r) { |
23 |
- fatal = 1; |
24 |
- continue; |
25 |
- } |
26 |
+ } |
27 |
+ if (r) { |
28 |
+ fatal = 1; |
29 |
+ continue; |
30 |
} |
31 |
tvh_cond_wait(&sq->sq_cond, &sq->sq_mutex); |
32 |
continue; |