diff options
author | Andreas Mair <amair.sob@googlemail.com> | 2006-03-08 11:34:02 +0100 |
---|---|---|
committer | Andreas Mair <amair.sob@googlemail.com> | 2006-03-08 11:34:02 +0100 |
commit | 2723bd07c1a821c2198f43a313570c600907c327 (patch) | |
tree | feece2d6565c4f8508dfd2cf8aedc2e07959d25c /contrib/udpd.pl | |
parent | fd84627622f927bb6bf6f5c5d9e02295355a22c3 (diff) | |
download | vdradmin-am-3.4.4beta.tar.gz vdradmin-am-3.4.4beta.tar.bz2 |
2006-03-08: 3.4.4betav3.4.4beta
- Added script "convert.sh" to convert the AutoTimer information in VDR's timers.conf to the new format (see "convert.sh" for usage).
- Use the summary/aux timer field to store AutoTimer information to be compatible to VDR v1.3.44 and later.
- Removed "Add summary to new timers" option. The EPG summary is no longer copied to the timer's summary/aux field (for VDR 1.3.44+) or always copied (VDR 1.3.43-).
- Made summary textfield readonly while adding/editing a timer.
- Unless NO_EVENTID or NO_EVENTID_ON is used the EPG-ID is stored in every (auto)timer set using VDRAdmin-AM.
- For every timer the current start/stop margins are saved in its summary/aux field. These are used for checking AutoTimers by time.
- Fixed bug while checking for already programmed (auto)timers if not using EPG-ID.
Diffstat (limited to 'contrib/udpd.pl')
-rwxr-xr-x | contrib/udpd.pl | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/contrib/udpd.pl b/contrib/udpd.pl new file mode 100755 index 0000000..c4a38f1 --- /dev/null +++ b/contrib/udpd.pl @@ -0,0 +1,52 @@ +#!/usr/bin/perl + +## +# Simple UDP Server/Client to display messages in VDR +# +# 22.02.2004 by Thomas Koch <tom at linvdr dot org> +## + +use IO::Socket; +use IO::Socket::INET 1.26; +use strict; + +my $myself = join("", $0 =~ /^.*\/(.*)/); + +# Server +if($myself eq "udpd.pl") { + my $pid = fork(); + if($pid != 0) { + exit(0); + } + my($Socket) = IO::Socket::INET->new( + Proto => 'udp', + LocalPort => 4711, + Reuse => 1 + ) || die; + my $message; + while($Socket->recv($message, 1024)) { + my($port, $ipaddr) = sockaddr_in($Socket->peername); + my $hishost = gethostbyaddr($ipaddr, AF_INET); + system("logger udpd: client $hishost with message \\'$message\\'"); + for(my $z = 0; $z < 3; $z++) { + for(my $i = 0; $i < 3; $i++) { + system("svdrpsend.pl mesg $message 2>/dev/null >/dev/null"); + } + sleep(3); + } + } + exit(0); +} + +# Client +if($myself eq "udpc.pl") { + my $message = join(" ", @ARGV); + my $Socket = IO::Socket::INET->new( + PeerAddr => inet_ntoa(INADDR_BROADCAST), + PeerPort => 4711, + Proto => 'udp', + Broadcast => 1 + ) || die; + my $result = $Socket->send($message); +} + |