From: Jaroslav Kysela Date: Mon, 7 Aug 2017 12:08:31 +0000 (+0200) Subject: apply missing ntohs() for IP_PORT() return values, fixes #4520 X-Git-Tag: v4.2.4~91 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6211fa40c17b4d5644cfa9e06620153bd6707e32;p=thirdparty%2Ftvheadend.git apply missing ntohs() for IP_PORT() return values, fixes #4520 --- diff --git a/src/satip/rtsp.c b/src/satip/rtsp.c index e08c626d3..ee3fdca3d 100644 --- a/src/satip/rtsp.c +++ b/src/satip/rtsp.c @@ -1143,7 +1143,7 @@ play: tvhdebug(LS_SATIPS, "%i/%s/%d: %s from %s:%d %s", rs->frontend, rs->session, rs->stream, - caller, hc->hc_peer_ipstr, IP_PORT(*hc->hc_peer), buf); + caller, hc->hc_peer_ipstr, ntohs(IP_PORT(*hc->hc_peer)), buf); ok: errcode = 0; @@ -1460,7 +1460,7 @@ rtsp_process_teardown(http_connection_t *hc) } tvhdebug(LS_SATIPS, "-/%s/%i: teardown from %s:%d", - hc->hc_session, stream, hc->hc_peer_ipstr, IP_PORT(*hc->hc_peer)); + hc->hc_session, stream, hc->hc_peer_ipstr, ntohs(IP_PORT(*hc->hc_peer))); pthread_mutex_lock(&rtsp_lock); rs = rtsp_find_session(hc, stream); diff --git a/src/upnp.c b/src/upnp.c index 81fef3804..161094e7a 100644 --- a/src/upnp.c +++ b/src/upnp.c @@ -174,7 +174,7 @@ upnp_thread( void *aux ) inet_ntop(ip.ss_family, IP_IN_ADDR(ip), tbuf, sizeof(tbuf)); tvhtrace(LS_UPNP, "%s - received data from %s:%hu [size=%zi]", conn == multicast ? "multicast" : "unicast", - tbuf, (unsigned short) IP_PORT(ip), size); + tbuf, (unsigned short) ntohs(IP_PORT(ip)), size); tvhlog_hexdump(LS_UPNP, buf, size); } /* TODO: a filter */