X-Git-Url: http://gb7djk.dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2Fcluster.pl;h=fe881f1eaa78a4dde7b525a227f98af3816930ab;hb=bfb3961b8ac7b159ef8155361003bfdd9d26dfad;hp=0fc478ea4dd4adc0b366b037b197ed975223c3c6;hpb=ed6790555f077eb521b8805113155a2ff99cc47e;p=spider.git diff --git a/perl/cluster.pl b/perl/cluster.pl index 0fc478ea..fe881f1e 100755 --- a/perl/cluster.pl +++ b/perl/cluster.pl @@ -116,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 $do_xml + $allowdxby $dbh $dsn $dbuser $dbpass $do_xml $systime_days $systime_daystart ); @inqueue = (); # the main input queue, an array of hashes @@ -131,11 +131,8 @@ $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 -= 3; # fudge (put back for now) +($VERSION, $BRANCH) = dxver( q$Revision$); +$main::build -= 2; # fudge (put back for now) @@ -332,6 +329,8 @@ sub AGWrestart ############################################################# $starttime = $systime = time; +$systime_days = int ($systime / 86400); +$systime_daystart = $systime_days * 86400; $lang = 'en' unless $lang; unless ($DB::VERSION) { @@ -463,6 +462,8 @@ DXProt->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)); +$routeroot->do_pc92(1); +$routeroot->via_pc92(1); # make sure that there is a routing OUTPUT node default file #unless (Filter::read_in('route', 'node_default', 0)) { @@ -511,7 +512,13 @@ for (;;) { # do timed stuff, ongoing processing happens one a second if ($timenow != $systime) { reap() if $zombies; - IsoTime::update($systime = $timenow); + $systime = $timenow; + my $days = int ($systime / 86400); + if ($systime_days != $days) { + $systime_days = $days; + $systime_daystart = $days * 86400; + } + IsoTime::update($systime); DXCron::process(); # do cron jobs DXCommandmode::process(); # process ongoing command mode stuff DXXml::process();