diff options
-rw-r--r-- | HISTORY | 1 | ||||
-rw-r--r-- | po/cs.po | 6 | ||||
-rw-r--r-- | po/de.po | 6 | ||||
-rw-r--r-- | po/es.po | 6 | ||||
-rw-r--r-- | po/fi.po | 6 | ||||
-rw-r--r-- | po/fr.po | 6 | ||||
-rw-r--r-- | po/it.po | 6 | ||||
-rw-r--r-- | po/nl.po | 6 | ||||
-rw-r--r-- | po/ru.po | 6 | ||||
-rw-r--r-- | po/vdradmin.pot | 6 | ||||
-rwxr-xr-x | vdradmind.pl | 33 |
11 files changed, 56 insertions, 32 deletions
@@ -8,6 +8,7 @@ VDR-Portal: amair - Updated: Dutch translation (Submitted by Roel Koelewijn). - Updated: Finnish translation (Ville Skyttä). - Improved: Access logging (Ville Skyttä). +- Improved: SVDRP connection error handling/logging/messages (Ville Skyttä). 2010-04-10: 3.6.7 - Updated: Italian translation (Submitted by Diego Pierotto). @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: cs\n" "Report-Msgid-Bugs-To: Andreas Mair <andreas@vdr-developer.org>\n" -"POT-Creation-Date: 2010-03-07 14:04+0100\n" +"POT-Creation-Date: 2011-02-13 21:52+0200\n" "PO-Revision-Date: 2006-09-23 13:14+0200\n" "Last-Translator: Karel Borkovec <her-ur@her-ur.org>\n" "Language-Team: Czech <cs@li.org>\n" @@ -1528,8 +1528,8 @@ msgid "Can't open file \"%s\"!" msgstr "Nemohu otevøít soubor \"%s\"!" #, perl-format -msgid "Can't connect to VDR at %s:%s<br /><br />Please check if VDR is running and if VDR's svdrphosts.conf is configured correctly." -msgstr "Nemohu se pøipojit k VDR v %s:%s<br /><br />Prosím zkontrolujte, zda VDR bì¾í a pokud je soubor soubor svdrphosts.conf øádnì nastaven." +msgid "Can't connect to VDR at %s:%s: %s<br /><br />Please check if VDR is running and if VDR's svdrphosts.conf is configured correctly." +msgstr "Nemohu se pøipojit k VDR v %s:%s: %s<br /><br />Prosím zkontrolujte, zda VDR bì¾í a pokud je soubor soubor svdrphosts.conf øádnì nastaven." #, perl-format msgid "Error while sending command to VDR at %s" @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: VDRAdmin-AM-3.6.5+cvs\n" "Report-Msgid-Bugs-To: Andreas Mair <andreas@vdr-developer.org>\n" -"POT-Creation-Date: 2010-03-07 14:04+0100\n" +"POT-Creation-Date: 2011-02-13 21:52+0200\n" "PO-Revision-Date: 2009-12-30 19:31+0200\n" "Last-Translator: Andreas Mair <mail@andreas.vdr-developer.org>\n" "Language-Team: German <mail@andreas.vdr-developer.org>\n" @@ -1430,8 +1430,8 @@ msgid "Can't open file \"%s\"!" msgstr "Kann Datei \"%s\" nicht öffnen!" #, perl-format -msgid "Can't connect to VDR at %s:%s<br /><br />Please check if VDR is running and if VDR's svdrphosts.conf is configured correctly." -msgstr "Konnte Verbindung zu %s:%s nicht aufbauen!<br /><br />Bitte überprüfen Sie, dass VDR läuft und dass seine svdrphosts.conf richtig konfiguriert ist." +msgid "Can't connect to VDR at %s:%s: %s<br /><br />Please check if VDR is running and if VDR's svdrphosts.conf is configured correctly." +msgstr "Konnte Verbindung zu %s:%s nicht aufbauen: %s<br /><br />Bitte überprüfen Sie, dass VDR läuft und dass seine svdrphosts.conf richtig konfiguriert ist." #, perl-format msgid "Error while sending command to VDR at %s" @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: VDRAdmin-AM-3.6.6\n" "Report-Msgid-Bugs-To: Andreas Mair <andreas@vdr-developer.org>\n" -"POT-Creation-Date: 2010-03-07 14:04+0100\n" +"POT-Creation-Date: 2011-02-13 21:52+0200\n" "PO-Revision-Date: 2010-02-11 22:46+0100\n" "Last-Translator: Manuel Gomez <mgrojo@gmail.com>\n" "Language-Team: Spanish <r_jung@web.de>\n" @@ -1542,8 +1542,8 @@ msgid "Can't open file \"%s\"!" msgstr "¡No se pudo abrir el archivo \"%s\" !" #, perl-format -msgid "Can't connect to VDR at %s:%s<br /><br />Please check if VDR is running and if VDR's svdrphosts.conf is configured correctly." -msgstr "No se puede conectar a VDR a %s:%s<br /><br />Compruebe si VDR está en marcha y su svdrhosts.conf bien configurado." +msgid "Can't connect to VDR at %s:%s: %s<br /><br />Please check if VDR is running and if VDR's svdrphosts.conf is configured correctly." +msgstr "No se puede conectar a VDR a %s:%s: %s<br /><br />Compruebe si VDR está en marcha y su svdrhosts.conf bien configurado." #, perl-format msgid "Error while sending command to VDR at %s" @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: VDRAdmin-AM-3.6.2\n" "Report-Msgid-Bugs-To: Andreas Mair <andreas@vdr-developer.org>\n" -"POT-Creation-Date: 2010-03-07 14:04+0100\n" +"POT-Creation-Date: 2011-02-13 21:52+0200\n" "PO-Revision-Date: 2011-02-13 19:50+0200\n" "Last-Translator: Ville Skyttä <ville.skytta@iki.fi>\n" "Language-Team: Finnish <vdr@linuxtv.org>\n" @@ -1439,8 +1439,8 @@ msgid "Can't open file \"%s\"!" msgstr "Tiedoston \"%s\" avaus ei onnistu!" #, perl-format -msgid "Can't connect to VDR at %s:%s<br /><br />Please check if VDR is running and if VDR's svdrphosts.conf is configured correctly." -msgstr "Yhteydenotto VDR:ään (%s:%s) epäonnistui!<br /><br />Varmista että VDR on käynnissä ja svdrphosts.conf-tiedoston oikeellisuus." +msgid "Can't connect to VDR at %s:%s: %s<br /><br />Please check if VDR is running and if VDR's svdrphosts.conf is configured correctly." +msgstr "Yhteydenotto VDR:ään (%s:%s) epäonnistui: %s<br /><br />Varmista että VDR on käynnissä ja svdrphosts.conf-tiedoston oikeellisuus." #, perl-format msgid "Error while sending command to VDR at %s" @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: VDRAdmin-AM-3.6.0\n" "Report-Msgid-Bugs-To: Andreas Mair <andreas@vdr-developer.org>\n" -"POT-Creation-Date: 2010-03-07 14:04+0100\n" +"POT-Creation-Date: 2011-02-13 21:52+0200\n" "PO-Revision-Date: 2007-08-23 10:45+0100\n" "Last-Translator: Trois Six <trois.six@free.fr>\n" "Language-Team: French <trois.six@free.fr>\n" @@ -1450,8 +1450,8 @@ msgid "Can't open file \"%s\"!" msgstr "Ne peut pas ouvrir le fichier \"%s\" !" #, perl-format -msgid "Can't connect to VDR at %s:%s<br /><br />Please check if VDR is running and if VDR's svdrphosts.conf is configured correctly." -msgstr "Connexion impossible vers VDR %s:%s<br /><br />Merci de vérifier que VDR est lancé et que le fichier svdrphosts.conf est configuré correctement." +msgid "Can't connect to VDR at %s:%s: %s<br /><br />Please check if VDR is running and if VDR's svdrphosts.conf is configured correctly." +msgstr "Connexion impossible vers VDR %s:%s: %s<br /><br />Merci de vérifier que VDR est lancé et que le fichier svdrphosts.conf est configuré correctement." #, perl-format msgid "Error while sending command to VDR at %s" @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: VDRAdmin-AM-3.6.6\n" "Report-Msgid-Bugs-To: Andreas Mair <andreas@vdr-developer.org>\n" -"POT-Creation-Date: 2010-03-07 14:04+0100\n" +"POT-Creation-Date: 2011-02-13 21:52+0200\n" "PO-Revision-Date: 2010-03-29 01:02+0100\n" "Last-Translator: Diego Pierotto <vdr-italian@tiscali.it>\n" "Language-Team: Italian <vdr-italian@tiscali.it>\n" @@ -1441,8 +1441,8 @@ msgid "Can't open file \"%s\"!" msgstr "Non posso aprire il file \"%s\"!" #, perl-format -msgid "Can't connect to VDR at %s:%s<br /><br />Please check if VDR is running and if VDR's svdrphosts.conf is configured correctly." -msgstr "Impossibile collegarsi a VDR al %s:%s<br /><br />Controlla che VDR sia in esecuzione e che il file svdrphosts.conf di VDR sia configurato correttamente." +msgid "Can't connect to VDR at %s:%s: %s<br /><br />Please check if VDR is running and if VDR's svdrphosts.conf is configured correctly." +msgstr "Impossibile collegarsi a VDR al %s:%s: %s<br /><br />Controlla che VDR sia in esecuzione e che il file svdrphosts.conf di VDR sia configurato correttamente." #, perl-format msgid "Error while sending command to VDR at %s" @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: VDRAdmin-AM-3.6.7\n" "Report-Msgid-Bugs-To: Andreas Mair <andreas@vdr-developer.org>\n" -"POT-Creation-Date: 2010-03-07 14:04+0100\n" +"POT-Creation-Date: 2011-02-13 21:52+0200\n" "PO-Revision-Date: 2010-08-13 13:36+0200\n" "Last-Translator: Roel Koelewijn <roel.koelewijn@gmail.com>\n" "Language-Team: Dutch <nl@li.org>\n" @@ -1432,8 +1432,8 @@ msgid "Can't open file \"%s\"!" msgstr "Kan bestand \"%s\" niet openen!" #, perl-format -msgid "Can't connect to VDR at %s:%s<br /><br />Please check if VDR is running and if VDR's svdrphosts.conf is configured correctly." -msgstr "Kan geen verbinding maken met VDR at %s:%s<br /><br /> Controleer of VDR draait en of VDR's svdrphosts.conf op de juiste manier is geconfigureerd." +msgid "Can't connect to VDR at %s:%s: %s<br /><br />Please check if VDR is running and if VDR's svdrphosts.conf is configured correctly." +msgstr "Kan geen verbinding maken met VDR at %s:%s: %s<br /><br />Controleer of VDR draait en of VDR's svdrphosts.conf op de juiste manier is geconfigureerd." #, perl-format msgid "Error while sending command to VDR at %s" @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: ru\n" "Report-Msgid-Bugs-To: Andreas Mair <andreas@vdr-developer.org>\n" -"POT-Creation-Date: 2010-03-07 14:04+0100\n" +"POT-Creation-Date: 2011-02-13 21:52+0200\n" "PO-Revision-Date: 2006-10-27 15:42+0100\n" "Last-Translator: Oleg Roitburd <oleg@roitburd.de>\n" "Language-Team: Russian <LL@li.org>\n" @@ -1473,8 +1473,8 @@ msgid "Can't open file \"%s\"!" msgstr "½Õ ÜÞÖÕâ ÞâÚàëâì äÐÙÛ \"%s\"!" #, perl-format -msgid "Can't connect to VDR at %s:%s<br /><br />Please check if VDR is running and if VDR's svdrphosts.conf is configured correctly." -msgstr "½Õ ÜÞÓã áÞÕÔØÝØâìáï á VDR %s:%s<br /><br />¿àÞÚÞÝâàÞÛØàãÙâÕ VDR Ø svdrphosts.conf" +msgid "Can't connect to VDR at %s:%s: %s<br /><br />Please check if VDR is running and if VDR's svdrphosts.conf is configured correctly." +msgstr "½Õ ÜÞÓã áÞÕÔØÝØâìáï á VDR %s:%s: %s<br /><br />¿àÞÚÞÝâàÞÛØàãÙâÕ VDR Ø svdrphosts.conf" #, perl-format msgid "Error while sending command to VDR at %s" diff --git a/po/vdradmin.pot b/po/vdradmin.pot index 20024e0..69693c4 100644 --- a/po/vdradmin.pot +++ b/po/vdradmin.pot @@ -19,9 +19,9 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: VDRAdmin-AM 3.6.5+cvs\n" +"Project-Id-Version: VDRAdmin-AM 3.6.7\n" "Report-Msgid-Bugs-To: Andreas Mair <andreas@vdr-developer.org>\n" -"POT-Creation-Date: 2010-03-07 14:04+0100\n" +"POT-Creation-Date: 2011-02-13 21:52+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -1442,7 +1442,7 @@ msgid "Can't open file \"%s\"!" msgstr "" #, perl-format -msgid "Can't connect to VDR at %s:%s<br /><br />Please check if VDR is running and if VDR's svdrphosts.conf is configured correctly." +msgid "Can't connect to VDR at %s:%s: %s<br /><br />Please check if VDR is running and if VDR's svdrphosts.conf is configured correctly." msgstr "" #, perl-format diff --git a/vdradmind.pl b/vdradmind.pl index f59e558..08a8985 100755 --- a/vdradmind.pl +++ b/vdradmind.pl @@ -3469,7 +3469,7 @@ sub LoadTranslation { forbidden_long => gettext("You don't have permission to access this function!"), forbidden_file => gettext("Access to file \"%s\" denied!"), cant_open => gettext("Can't open file \"%s\"!"), - connect_failed => gettext("Can't connect to VDR at %s:%s<br /><br />Please check if VDR is running and if VDR's svdrphosts.conf is configured correctly."), + connect_failed => gettext("Can't connect to VDR at %s:%s: %s<br /><br />Please check if VDR is running and if VDR's svdrphosts.conf is configured correctly."), send_command => gettext("Error while sending command to VDR at %s"), ); @@ -6914,16 +6914,39 @@ sub myconnect { my $this = shift; main::Log(LOG_DEBUG, "[SVDRP] Connecting to $CONFIG{VDR_HOST}:$CONFIG{VDR_PORT}"); + my $connect_error = undef; $SOCKET = $VdrSocketModule->new(PeerAddr => $CONFIG{VDR_HOST}, PeerPort => $CONFIG{VDR_PORT}, Proto => 'tcp' - ) - || main::HTMLError(sprintf($ERROR_MESSAGE{connect_failed}, $CONFIG{VDR_HOST}, $CONFIG{VDR_PORT})) && return; + ); + my $line; + if ($SOCKET) { + chomp($line = <$SOCKET>); + main::Log(LOG_DEBUG, sprintf("[SVDRP] Read \"%s\"", $line)); + if ($line =~ /access\s+denied/i) { + # Blocked by svdrphosts.conf - VDR will close the connection + $this->close(); + $connect_error = $line; + } + } + else { + $connect_error = "$@"; + } + + if (defined($connect_error)) { + main::Log(main::LOG_WARNING, sprintf("Connection to %s:%s failed: %s", + $CONFIG{VDR_HOST}, + $CONFIG{VDR_PORT}, + $connect_error)); + main::HTMLError(sprintf($ERROR_MESSAGE{connect_failed}, + $CONFIG{VDR_HOST}, $CONFIG{VDR_PORT}, + CGI::escapeHTML($connect_error))); + return; + } $connected = true; - my $line; - $line = <$SOCKET>; + if (!$FEATURES{VDRVERSION}) { $line =~ /^220.*VideoDiskRecorder (\d+)\.(\d+)\.(\d+)([^;]*);/; $FEATURES{VDRVERSION_HR} = "$1.$2.$3$4"; |