summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVille Skyttä <ville.skytta@iki.fi>2011-05-03 10:38:53 +0300
committerVille Skyttä <ville.skytta@iki.fi>2011-05-03 10:38:53 +0300
commiteffb2b1e9094b921cbbdd3020cb35c531c04ed39 (patch)
treea7e6025ca4a13df36cbfb48e222b29ddcf1b96d2
parent72e43d58d1b29e29e53c87bf5a22219c2b053256 (diff)
downloadvdradmin-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--HISTORY1
-rwxr-xr-xvdradmind.pl10
2 files changed, 9 insertions, 2 deletions
diff --git a/HISTORY b/HISTORY
index 62c8256..a30ac92 100644
--- a/HISTORY
+++ b/HISTORY
@@ -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});