X-Git-Url: http://gb7djk.dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FIntMsg.pm;h=510a1f9a661ab03162ba9370c68ab5e3f4a56730;hb=dbc63738d8b497c03bfb81c84e61161bb5c7931a;hp=6e588b3ef7ddbb86c0165e229d37181c08179253;hpb=51ed97f9175c71dd611f8333adeee346760d6a98;p=spider.git diff --git a/perl/IntMsg.pm b/perl/IntMsg.pm index 6e588b3e..510a1f9a 100644 --- a/perl/IntMsg.pm +++ b/perl/IntMsg.pm @@ -10,6 +10,13 @@ package IntMsg; use strict; + +use vars qw($VERSION $BRANCH); +$VERSION = sprintf( "%d.%03d", q$Revision$ =~ /(\d+)\.(\d+)/ ); +$BRANCH = sprintf( "%d.%03d", q$Revision$ =~ /\d+\.\d+\.(\d+)\.(\d+)/ ) || 0; +$main::build += $VERSION; +$main::branch += $BRANCH; + use Msg; use vars qw(@ISA); @@ -27,7 +34,7 @@ sub dequeue { my $conn = shift; - if ($conn->{msg} =~ /\n/) { + if ($conn && $conn->{msg} =~ /\n/) { my @lines = split /\r?\n/, $conn->{msg}; if ($conn->{msg} =~ /\n$/) { delete $conn->{msg}; @@ -41,7 +48,7 @@ sub dequeue } else { $_ = ''; } - &{$conn->{rproc}}($conn, $_); + &{$conn->{rproc}}($conn, $_) if exists $conn->{rproc}; } } }