X-Git-Url: http://www.dxcluster.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FDXDb.pm;h=5d96e6cf2029db4ad798a699b350ff1f877ef392;hb=48f0cb90d0cfbe3037f353fc25adfc33561634fa;hp=2122234bf8fe9d8c8a6025d73707a3e49d698ab9;hpb=5a06cd7853e8bff86a0f17854c0791bb3f85c395;p=spider.git diff --git a/perl/DXDb.pm b/perl/DXDb.pm index 2122234b..5d96e6cf 100644 --- a/perl/DXDb.pm +++ b/perl/DXDb.pm @@ -21,40 +21,34 @@ $dbbase = "$main::root/db"; # where all the databases are kept; %avail = (); # The hash contains a list of all the databases %valid = ( accesst => '9,Last Accs Time,atime', + allowread => '9,Allowed read,parray', + allowupd => '9,Allow upd,parray', + atemplate => '9,App Templates,parray', + cal => '0,No Key txt', + chain => '0,Search these,parray', createt => '9,Create Time,atime', - lastt => '9,Last Upd Time,atime', - name => '0,Name', db => '9,DB Tied hash', - remote => '0,Remote Database', - pre => '0,Heading txt', - post => '0,Tail txt', - chain => '0,Search these,parray', - disable => '0,Disabled?,yesno', - nf => '0,Not Found txt', - cal => '0,No Key txt', - allowread => '9,Allowed read,parray', denyread => '9,Deny read,parray', - allowupd => '9,Allow upd,parray', denyupd => '9,Deny upd,parray', + disable => '0,Disabled?,yesno', fwdupd => '9,Forw upd to,parray', - template => '9,Upd Templates,parray', - te => '9,End Upd txt', - tae => '9,End App txt', - atemplate => '9,App Templates,parray', help => '0,Help txt,parray', + lastt => '9,Last Upd Time,atime', localcmd => '0,Local Command', + name => '0,Name', + nf => '0,Not Found txt', + post => '0,Tail txt', + pre => '0,Heading txt', + remote => '0,Remote Database', + tae => '9,End App txt', + te => '9,End Upd txt', + template => '9,Upd Templates,parray', ); $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; } }