From: Jaroslav Kysela Date: Mon, 27 Feb 2017 16:32:20 +0000 (+0100) Subject: SAT>IP server cleanups, fixes #4252 X-Git-Tag: v4.2.1~96 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=da583493d3760b0502666cb39cf78ed6d5fdf9d3;p=thirdparty%2Ftvheadend.git SAT>IP server cleanups, fixes #4252 --- diff --git a/src/satip/rtsp.c b/src/satip/rtsp.c index c9d8d9523..e061bdf23 100644 --- a/src/satip/rtsp.c +++ b/src/satip/rtsp.c @@ -1683,7 +1683,7 @@ void satip_server_rtsp_done(void) rtsp_port = -1; free(rtsp_ip); free(rtsp_nat_ip); - rtsp_ip = NULL; + rtsp_ip = rtsp_nat_ip = NULL; satip_rtp_done(); pthread_mutex_unlock(&global_lock); } diff --git a/src/satip/server.c b/src/satip/server.c index e0bf95c8a..4259405ee 100644 --- a/src/satip/server.c +++ b/src/satip/server.c @@ -529,6 +529,10 @@ static void satip_server_info(const char *prefix, int descramble, int muxcnf) int fe, findex; const char *ftype; + if (satip_server_rtsp_port <= 0) { + tvhinfo(LS_SATIPS, "SAT>IP Server inactive"); + return; + } tvhinfo(LS_SATIPS, "SAT>IP Server %sinitialized", prefix); tvhinfo(LS_SATIPS, " HTTP %s:%d, RTSP %s:%d", http_server_ip, http_server_port, @@ -761,6 +765,9 @@ static void satip_server_init_common(const char *prefix, int announce) int descramble, rewrite_pmt, muxcnf; char *nat_ip; + if (satip_server_rtsp_port <= 0) + return; + if (http_server_ip == NULL) { if (tcp_server_onall(http_server) && satip_server_bindaddr == NULL) { tvherror(LS_SATIPS, "use --satip_bindaddr parameter to select the local IP for SAT>IP"); @@ -775,9 +782,6 @@ static void satip_server_init_common(const char *prefix, int announce) http_server_port = ntohs(IP_PORT(http)); } - if (satip_server_rtsp_port <= 0) - return; - descramble = satip_server_conf.satip_descramble; rewrite_pmt = satip_server_conf.satip_rewrite_pmt; muxcnf = satip_server_conf.satip_muxcnf;