Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
SAT>IP server: add more logs for RTPC
  • Loading branch information
perexg committed Nov 3, 2015
1 parent 17fe09c commit ac70d65
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/satip/rtp.c
Expand Up @@ -746,10 +746,11 @@ satip_rtcp_thread(void *aux)
{
satip_rtp_session_t *rtp;
struct timespec ts;
uint8_t msg[RTCP_PAYLOAD];
uint8_t msg[RTCP_PAYLOAD+1];
char addrbuf[50];
int r, len, err;

tvhtrace("satips", "starting rtcp thread");
while (satip_rtcp_run) {
ts.tv_sec = 0;
ts.tv_nsec = 150000000;
Expand All @@ -763,6 +764,11 @@ satip_rtcp_thread(void *aux)
if (rtp->sq == NULL) continue;
len = satip_rtcp_build(rtp, msg);
if (len <= 0) continue;
if (tvhtrace_enabled()) {
msg[len] = '\0';
tcp_get_str_from_ip((struct sockaddr*)&rtp->peer2, addrbuf, sizeof(addrbuf));
tvhtrace("satips", "RTCP send to %s:%d : %s", addrbuf, IP_PORT(rtp->peer2), msg + 16);
}
r = sendto(rtp->fd_rtcp, msg, len, 0,
(struct sockaddr*)&rtp->peer2,
rtp->peer2.ss_family == AF_INET6 ?
Expand Down

0 comments on commit ac70d65

Please sign in to comment.