From 96647c3c3ddb0161bc9fe67007897daadeb4a26f Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Sun, 4 Dec 2011 21:46:30 +0100 Subject: Removed the '.pl' suffix from svdrpsend.pl --- HISTORY | 4 ++++ config.h | 10 +++++----- svdrpsend | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ svdrpsend.pl | 57 --------------------------------------------------------- 4 files changed, 66 insertions(+), 62 deletions(-) create mode 100755 svdrpsend delete mode 100755 svdrpsend.pl diff --git a/HISTORY b/HISTORY index c74c1a07..2b8f2934 100644 --- a/HISTORY +++ b/HISTORY @@ -6780,3 +6780,7 @@ Video Disk Recorder Revision History - Added file name and line number to LOG_ERROR_STR() (thanks to Rolf Ahrenberg). - Replaced all calls to sleep() with cCondWait::SleepMs() (thanks to Rolf Ahrenberg). - Fixed a crash with malformed SI data (patch from vdr-portal). + +2011-12-04: Version 1.7.23 + +- Removed the '.pl' suffix from svdrpsend.pl (sorry, I missed that one). diff --git a/config.h b/config.h index 73db58f0..faa62582 100644 --- a/config.h +++ b/config.h @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: config.h 2.36 2011/12/03 14:19:52 kls Exp $ + * $Id: config.h 2.37 2011/12/04 21:46:30 kls Exp $ */ #ifndef __CONFIG_H @@ -22,13 +22,13 @@ // VDR's own version number: -#define VDRVERSION "1.7.22" -#define VDRVERSNUM 10722 // Version * 10000 + Major * 100 + Minor +#define VDRVERSION "1.7.23" +#define VDRVERSNUM 10723 // Version * 10000 + Major * 100 + Minor // The plugin API's version number: -#define APIVERSION "1.7.22" -#define APIVERSNUM 10722 // Version * 10000 + Major * 100 + Minor +#define APIVERSION "1.7.23" +#define APIVERSNUM 10723 // Version * 10000 + Major * 100 + Minor // When loading plugins, VDR searches them by their APIVERSION, which // may be smaller than VDRVERSION in case there have been no changes to diff --git a/svdrpsend b/svdrpsend new file mode 100755 index 00000000..caf3b41f --- /dev/null +++ b/svdrpsend @@ -0,0 +1,57 @@ +#!/usr/bin/perl + +use Socket; +use Getopt::Std; + +$Usage = qq{ +Usage: $0 options command... + +Options: -d hostname destination hostname (default: localhost) + -p port SVDRP port number (default: 6419) +}; + +die $Usage if (!$ARGV[0] || !getopts("d:p:")); + +$Dest = $opt_d || "localhost"; +$Port = $opt_p || 6419; +$Cmd = "@ARGV" || Error("missing command"); + +$Timeout = 10; # max. seconds to wait for response + +$SIG{ALRM} = sub { Error("timeout"); }; +alarm($Timeout); + +$iaddr = inet_aton($Dest) || Error("no host: $Dest"); +$paddr = sockaddr_in($Port, $iaddr); + +$proto = getprotobyname('tcp'); +socket(SOCK, PF_INET, SOCK_STREAM, $proto) || Error("socket: $!"); +connect(SOCK, $paddr) || Error("connect: $!"); +select(SOCK); $| = 1; +Receive(); +Send($Cmd); +Send("quit"); +close(SOCK) || Error("close: $!"); + +sub Send +{ + my $cmd = shift || Error("no command to send"); + print SOCK "$cmd\r\n"; + Receive(); +} + +sub Receive +{ + while () { + print STDOUT $_; + last if substr($_, 3, 1) ne "-"; + } +} + +sub Error +{ + print STDERR "@_\n"; + close(SOCK); + exit 1; +} + diff --git a/svdrpsend.pl b/svdrpsend.pl deleted file mode 100755 index caf3b41f..00000000 --- a/svdrpsend.pl +++ /dev/null @@ -1,57 +0,0 @@ -#!/usr/bin/perl - -use Socket; -use Getopt::Std; - -$Usage = qq{ -Usage: $0 options command... - -Options: -d hostname destination hostname (default: localhost) - -p port SVDRP port number (default: 6419) -}; - -die $Usage if (!$ARGV[0] || !getopts("d:p:")); - -$Dest = $opt_d || "localhost"; -$Port = $opt_p || 6419; -$Cmd = "@ARGV" || Error("missing command"); - -$Timeout = 10; # max. seconds to wait for response - -$SIG{ALRM} = sub { Error("timeout"); }; -alarm($Timeout); - -$iaddr = inet_aton($Dest) || Error("no host: $Dest"); -$paddr = sockaddr_in($Port, $iaddr); - -$proto = getprotobyname('tcp'); -socket(SOCK, PF_INET, SOCK_STREAM, $proto) || Error("socket: $!"); -connect(SOCK, $paddr) || Error("connect: $!"); -select(SOCK); $| = 1; -Receive(); -Send($Cmd); -Send("quit"); -close(SOCK) || Error("close: $!"); - -sub Send -{ - my $cmd = shift || Error("no command to send"); - print SOCK "$cmd\r\n"; - Receive(); -} - -sub Receive -{ - while () { - print STDOUT $_; - last if substr($_, 3, 1) ne "-"; - } -} - -sub Error -{ - print STDERR "@_\n"; - close(SOCK); - exit 1; -} - -- cgit v1.2.3