static int satip_server_rtsp_port_locked;
static upnp_service_t *satips_upnp_discovery;
static pthread_mutex_t satip_server_reinit;
+static int bound_port;
static void satip_server_save(void);
int rtsp_port = satip_server_rtsp_port;
if (!satip_server_rtsp_port_locked)
rtsp_port = satip_server_conf.satip_rtsp > 0 ? satip_server_conf.satip_rtsp : def;
- if (getuid() != 0 && rtsp_port > 0 && rtsp_port < 1024) {
+ if (getuid() != 0 && rtsp_port > 0 && rtsp_port < 1024 && bound_port != rtsp_port) {
tvherror(LS_SATIPS, "RTSP port %d specified but no root perms, using 9983", rtsp_port);
rtsp_port = 9983;
}
muxcnf = satip_server_conf.satip_muxcnf;
nat_ip = strdup(satip_server_conf.satip_nat_ip ?: "");
nat_port = satip_server_conf.satip_nat_rtsp ?: satip_server_rtsp_port;
+ bound_port = satip_server_rtsp_port;
if (announce)
pthread_mutex_unlock(&global_lock);