diff options
author | Ville Skyttä <ville.skytta@iki.fi> | 2011-05-03 10:38:53 +0300 |
---|---|---|
committer | Ville Skyttä <ville.skytta@iki.fi> | 2011-05-03 10:38:53 +0300 |
commit | effb2b1e9094b921cbbdd3020cb35c531c04ed39 (patch) | |
tree | a7e6025ca4a13df36cbfb48e222b29ddcf1b96d2 | |
parent | 72e43d58d1b29e29e53c87bf5a22219c2b053256 (diff) | |
download | vdradmin-am-effb2b1e9094b921cbbdd3020cb35c531c04ed39.tar.gz vdradmin-am-effb2b1e9094b921cbbdd3020cb35c531c04ed39.tar.bz2 |
Default SVDRP port is 6419 in initial config if locally installed VDR is >= 1.7.15.
http://projects.vdr-developer.org/issues/626
-rw-r--r-- | HISTORY | 1 | ||||
-rwxr-xr-x | vdradmind.pl | 10 |
2 files changed, 9 insertions, 2 deletions
@@ -9,6 +9,7 @@ VDR-Portal: amair - Updated: Finnish translation (Ville Skyttä). - Improved: Access logging (Ville Skyttä). - Improved: SVDRP connection error handling/logging/messages (Ville Skyttä). +- Improved: Default SVDRP port is 6419 in initial config if locally installed VDR is >= 1.7.15 (Ville Skyttä). 2010-04-10: 3.6.7 - Updated: Italian translation (Submitted by Diego Pierotto). diff --git a/vdradmind.pl b/vdradmind.pl index 4162bd4..7d8806d 100755 --- a/vdradmind.pl +++ b/vdradmind.pl @@ -137,7 +137,7 @@ $CONFIG{AUTO_SAVE_CONFIG} = 1; # $CONFIG{VDR_HOST} = "localhost"; -$CONFIG{VDR_PORT} = 2001; +$CONFIG{VDR_PORT} = 2001; # will be set to 6419 in initial --config if locally installed VDR is >= 1.7.15 $CONFIG{SERVERHOST} = "0.0.0.0"; $CONFIG{SERVERPORT} = 8001; $CONFIG{LOCAL_NET} = "0.0.0.0/32"; @@ -354,7 +354,13 @@ for (my $i = 0 ; $i < scalar(@ARGV) ; $i++) { } if (/^(--config|-c)/) { $DAEMON = 0; - ReadConfig() if (-e $CONFFILE); + if (-e $CONFFILE) { + ReadConfig(); + } elsif ($CONFIG{VDR_PORT} == 2001 && + `vdr --version 2>/dev/null` =~ /^vdr\s+.*?(\d+)\.(\d+)\.(\d+)/mi) { + my $vdrversion = $1 * 10000 + $2 * 100 + $3; + $CONFIG{VDR_PORT} = 6419 if ($vdrversion >= 10715); + } LoadTranslation(); $CONFIG{VDR_HOST} = Question(gettext("What's your VDR hostname (e.g video.intra.net)?"), $CONFIG{VDR_HOST}); $CONFIG{VDR_PORT} = Question(gettext("On which port does VDR listen to SVDRP queries?"), $CONFIG{VDR_PORT}); |