X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2Fcluster.pl;h=e8e7cb0568b0f51fef1d93ff7a2aa50b55278452;hb=f6fdd9847c1f46b233be56296cad39ad949d25ae;hp=003ae845becc11c9f73a8292333bfb91e17748c0;hpb=dc305f992d75a6b35edda9e1aefab510a3ed617e;p=spider.git diff --git a/perl/cluster.pl b/perl/cluster.pl index 003ae845..e8e7cb05 100755 --- a/perl/cluster.pl +++ b/perl/cluster.pl @@ -68,7 +68,6 @@ use DXCommandmode; use DXProtVars; use DXProtout; use DXProt; -use Aranea; use DXMsg; use DXCron; use DXConnect; @@ -99,10 +98,10 @@ use Mrtg; use USDB; use UDPMsg; use QSL; -use Thingy; use RouteDB; -use AMsg; use DXXml; +use DXSql; +use IsoTime; use Data::Dumper; use IO::File; @@ -117,7 +116,7 @@ use strict; use vars qw(@inqueue $systime $version $starttime $lockfn @outstanding_connects $zombies $root @listeners $lang $myalias @debug $userfn $clusteraddr $clusterport $mycall $decease $is_win $routeroot $me $reqreg $bumpexisting - $allowdxby $dbh $dsn $dbuser $dbpass + $allowdxby $dbh $dsn $dbuser $dbpass $do_xml ); @inqueue = (); # the main input queue, an array of hashes @@ -131,15 +130,6 @@ $bumpexisting = 1; # 1 = allow new connection to disconnect old, 0 - don't al $allowdxby = 0; # 1 = allow "dx by ", 0 - don't allow it -use vars qw($VERSION $BRANCH $build $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; -$main::build += 1; # fudge (put back for now) - - - # send a message to call on conn and disconnect sub already_conn { @@ -351,14 +341,9 @@ $build += $main::version; $build = "$build.$branch" if $branch; # try to load the database -if ($dsn && -e "$root/perl/DXSql.pm") { - require DXSql; - import DXSql; - - if (DXSql::init()) { - $dbh = DXSql->new($dsn); - $dbh = $dbh->connect($dsn, $dbuser, $dbpass) if $dbh; - } +if (DXSql::init($dsn)) { + $dbh = DXSql->new($dsn); + $dbh = $dbh->connect($dsn, $dbuser, $dbpass) if $dbh; } # try to load XML::Simple @@ -466,7 +451,6 @@ Spot->init(); # initialise the protocol engine dbg("Start Protocol Engines ..."); DXProt->init(); -Aranea->init(); # put in a DXCluster node for us here so we can add users and take them away $routeroot = Route::Node->new($mycall, $version*100+5300, Route::here($main::me->here)|Route::conf($main::me->conf)); @@ -517,12 +501,12 @@ for (;;) { # do timed stuff, ongoing processing happens one a second if ($timenow != $systime) { - reap if $zombies; - $systime = $timenow; + reap() if $zombies; + IsoTime::update($systime = $timenow); DXCron::process(); # do cron jobs DXCommandmode::process(); # process ongoing command mode stuff + DXXml::process(); DXProt::process(); # process ongoing ak1a pcxx stuff - Aranea::process(); DXConnect::process(); DXMsg::process(); DXDb::process();