X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FDXDb.pm;h=81d21928334ea81e15848eed639f58b3225cb062;hb=b9dffeff7239952814342dad19db3a51def6fab7;hp=2122234bf8fe9d8c8a6025d73707a3e49d698ab9;hpb=5a06cd7853e8bff86a0f17854c0791bb3f85c395;p=spider.git diff --git a/perl/DXDb.pm b/perl/DXDb.pm index 2122234b..81d21928 100644 --- a/perl/DXDb.pm +++ b/perl/DXDb.pm @@ -49,12 +49,6 @@ $lastprocesstime = time; $nextstream = 0; %stream = (); -use vars qw($VERSION $BRANCH); -$VERSION = sprintf( "%d.%03d", q$Revision$ =~ /(\d+)\.(\d+)/ ); -$BRANCH = sprintf( "%d.%03d", q$Revision$ =~ /\d+\.\d+\.(\d+)\.(\d+)/ || (0,0)); -$main::build += $VERSION; -$main::branch += $BRANCH; - # allocate a new stream for this request sub newstream { @@ -156,6 +150,10 @@ sub getkey my $key = uc shift; my $value; + # massage the key + $key =~ s/[\@\$\&\%\*]+//g; + $key =~ s/^[\.\/]+//g; + # make sure we are open $self->open; if ($self->{localcmd}) { @@ -273,7 +271,7 @@ sub handle_45 # incoming DB Information my $n = getstream($_[3]); if ($n) { - my $mchan = DXChannel->get($n->{call}); + my $mchan = DXChannel::get($n->{call}); $mchan->send($_[2] . ":$_[4]") if $mchan; } }