]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
apply missing ntohs() for IP_PORT() return values, fixes #4520
authorJaroslav Kysela <perex@perex.cz>
Mon, 7 Aug 2017 12:08:31 +0000 (14:08 +0200)
committerJaroslav Kysela <perex@perex.cz>
Tue, 22 Aug 2017 09:03:28 +0000 (11:03 +0200)
src/satip/rtsp.c
src/upnp.c

index e08c626d373f5b634afa6f4a5c5d73e32f8ec162..ee3fdca3d64f10cfb82b502caefe7a11d3ed0da8 100644 (file)
@@ -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);
index 81fef38044e769d23953a5b0113cdefb83c6612c..161094e7a5e27d20373550e6c536ce9a4f48538e 100644 (file)
@@ -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 */