Bug #4656

Using command line option --http_root breaks SATIP network announce

Added by Jeroen Hendriks 2 months ago. Updated 2 months ago.

Status:FixedStart date:2017-10-06
Priority:NormalDue date:
Assignee:Jaroslav Kysela% Done:

100%

Category:SAT>IP
Target version:-
Found in version:4.2/4.3/git-master Affected Versions:

Description

When using command line option --http_root to change the webserver root, the wrong %s/satip_server/ path is used during the satip xml description url broadcast/reply

Overriding the --http_root parameter for the /satip_server path works for RAW clients and TVH to TVH SATIP connections but the playlist/channel url is still broken. So the patch below is only a partial fix.

Don't know if this patch is the best approach, maybe a solution where the /satip_server/ and /playlist/ path is changed in the satip/server.c code (based on the --http_root parm ) is a preferred fix. (but this would require a rewrite of the current limited template SATIP html/xml code in server.c)

--- src/http.c  2017-10-06 17:05:09.000000000 +0200
+++ src/http.c  2017-10-06 17:23:10.597318502 +0200
@@ -1442,7 +1442,7 @@
   http_path_t *hp = malloc(sizeof(http_path_t));
   char *tmp;

-  if (tvheadend_webroot) {
+  if ((tvheadend_webroot) && (strncmp(path, "/satip_server", 13) != 0)) {
     size_t len = strlen(tvheadend_webroot) + strlen(path) + 1;
     hp->hp_path     = tmp = malloc(len);
     sprintf(tmp, "%s%s", tvheadend_webroot, path);

Associated revisions

Revision 0fd9f973
Added by Jaroslav Kysela 2 months ago

satip server: add webroot to XML/M3U URLs, fixes #4656

History

#1 Updated by Jaroslav Kysela 2 months ago

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

Also available in: Atom PDF