diff options
author | Andreas Mair <amair.sob@googlemail.com> | 2006-07-07 11:43:39 +0200 |
---|---|---|
committer | Andreas Mair <amair.sob@googlemail.com> | 2006-07-07 11:43:39 +0200 |
commit | f04236038448cce41ff2af10e2d0ccfcd8df378a (patch) | |
tree | 33979f482e9c11cf86a0ba10c3d0ed47a1e3d1a4 /contrib/udpd.pl | |
parent | ada389d94b34bfef75be700a6cb4e3f05ee102ff (diff) | |
download | vdradmin-am-3.4.6rc.tar.gz vdradmin-am-3.4.6rc.tar.bz2 |
2006-07-07: 3.4.6rcv3.4.6rc
- Replaced: Makefiles by make.sh (run "./make.sh" for usage information").
- Removed: LinVDR logo.
- Changed: colors in timeline.
- Fixed: layout problems in prog_summary detail view (Reported by Sven Soltau).
- Fixed: moving forward/backward at the end/start of a month (Reported by foobar42).
Diffstat (limited to 'contrib/udpd.pl')
-rwxr-xr-x | contrib/udpd.pl | 52 |
1 files changed, 0 insertions, 52 deletions
diff --git a/contrib/udpd.pl b/contrib/udpd.pl deleted file mode 100755 index c4a38f1..0000000 --- a/contrib/udpd.pl +++ /dev/null @@ -1,52 +0,0 @@ -#!/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); -} - |