Project

General

Profile

Bug #4656

Using command line option --http_root breaks SATIP network announce

Added by Jeroen Hendriks about 7 years ago. Updated about 7 years ago.

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

100%

Estimated time:
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);

History

#1

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|0fd9f973058b4e6e36fabd59c971b238ffd4881f.

Also available in: Atom PDF