Project

General

Profile

Feature #4619

SAT>IP: Drop "fe" parameter

Added by Mono Polimorph about 7 years ago. Updated about 7 years ago.

Status:
Fixed
Priority:
Normal
Category:
SAT>IP
Target version:
-
Start date:
2017-09-22
Due date:
% Done:

100%

Estimated time:

Description

Hi,

Another new patch for the SAT>IP protocol!
(Sorry for not put a PR... :( )

This patch is quite simple, but increases the compatibility with a lot of clients.
Some clients incorrectly use the "fe" parameter (Front-End selection). In regular client calls the SAT>IP server handles all physical tuners. So this parameter is only for setting the configuration of static multicast tuners. However, some clients add "&fe=1" in their requests. This is bogus and generates problems inside the TVH.

So, this patch adds a new option in the SAT>IP server configuration. This parameters disables the processing of the "fe" parameter in all RTSP calls. Therefore, it's actually fixing all those bogus clients.

Here the patch:

diff --git a/src/satip/rtsp.c b/src/satip/rtsp.c
index e194bcc..1dd1904 100644
--- a/src/satip/rtsp.c
+++ b/src/satip/rtsp.c
@@ -935,6 +935,7 @@ rtsp_parse_cmd
   has_args = !TAILQ_EMPTY(&hc->hc_req_args);

   fe = atoi(http_arg_get_remove(&hc->hc_req_args, "fe") ?: 0);
+  fe = satip_server_conf.satip_drop_fe ? 0 : fe;
   s = http_arg_get_remove(&hc->hc_req_args, "addpids");
   if (parse_pids(s, &addpids)) goto end;
   s = http_arg_get_remove(&hc->hc_req_args, "delpids");
diff --git a/src/satip/server.c b/src/satip/server.c
index e6b5fdf..148a2c3 100644
--- a/src/satip/server.c
+++ b/src/satip/server.c
@@ -719,6 +719,16 @@ const idclass_t satip_server_class = {
       .group  = 1,
     },
     {
+      .type   = PT_BOOL,
+      .id     = "satip_drop_fe",
+      .name   = N_("Drop \"fe=\" parameter"),
+      .desc   = N_("Discard the FrontEnd parameter in RTSP requests, " 
+                   "as some clients incorretly use it."),
+      .off    = offsetof(struct satip_server_conf, satip_drop_fe),
+      .opts   = PO_EXPERT,
+      .group  = 1,
+    },
+    {
       .type   = PT_INT,
       .id     = "satip_muxcnf",
       .name   = N_("Mux handling"),
diff --git a/src/satip/server.h b/src/satip/server.h
index 054e481..5dc6eac 100644
--- a/src/satip/server.h
+++ b/src/satip/server.h
@@ -51,6 +51,7 @@ struct satip_server_conf {
   int satip_notcp_mode;
   int satip_anonymize;
   int satip_noupnp;
+  int satip_drop_fe;
   int satip_iptv_sig_level;
   int satip_force_sig_level;
   int satip_dvbs;

I hope you can commit it soon! ;)
Regards.


Files

SAT-IP-Drop-fe-parameter.diff (1.48 KB) SAT-IP-Drop-fe-parameter.diff Patch Mono Polimorph, 2017-09-22 17:50

History

#1

Updated by Mono Polimorph about 7 years ago

Hi Jaroslav,

This patch solves troubles with some SAT>IP clients. It would be very intestering to add it too!

Regards.

#2

Updated by Mono Polimorph about 7 years ago

Still waiting for the acceptance of this patch. ;)

#3

Updated by Mono Polimorph about 7 years ago

I hope this patch will be accepted.
If there is something to change, please tell me what I have to do. ;)

#4

Updated by Jaroslav Kysela about 7 years ago

  • Status changed from New to Fixed
  • % Done changed from 0 to 100

Applied in changeset commit:tvheadend|dd4164f31e85681b50bc04c6c4be06e2c268b12a.

#5

Updated by Mono Polimorph about 7 years ago

Thanks! ;) (/)

Also available in: Atom PDF