From: Dirk Koopman Date: Sun, 2 Jan 2022 23:24:39 +0000 (+0000) Subject: fix DXVars.pm overrides line $clusterport X-Git-Url: http://scm.dxcluster.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=c7abd10080945488d7ea9d850aba2a8b565b4c57;p=spider.git fix DXVars.pm overrides line $clusterport This is only of use for the paranoid and people running more than one instance of DXSpider on one machine. --- diff --git a/Changes b/Changes index 210f782a..1264c275 100644 --- a/Changes +++ b/Changes @@ -1,3 +1,7 @@ +03Jan22======================================================================= +1. Allow overrides (on modern versions of perl) with things in DXVars.pm, such + $clusterport. This is really only of use for people trying to run more than + one instance of DXSpider on the same machine. 02Jan22======================================================================= 1. Fix dx bug introduced to handle dx by ip for webclusters. 2. Remove _add_thingy dbg message from general view. diff --git a/perl/cluster.pl b/perl/cluster.pl index ffdfa42d..d62b88b1 100755 --- a/perl/cluster.pl +++ b/perl/cluster.pl @@ -12,7 +12,7 @@ package main; -require 5.10.1; +require 5.16.1; use warnings; @@ -21,15 +21,15 @@ use vars qw($root $is_win $systime $lockfn @inqueue $starttime $lockfn @outstand $clusterport $mycall $decease $routeroot $me $reqreg $bumpexisting $allowdxby $dbh $dsn $dbuser $dbpass $do_xml $systime_days $systime_daystart $can_encode $maxconnect_user $maxconnect_node $idle_interval $log_flush_interval - $broadcast_debug + $broadcast_debug $yes $no $user_interval ); -$lang = 'en'; # default language -$clusteraddr = '127.0.0.1'; # cluster tcp host address - used for things like console.pl -$clusterport = 27754; # cluster tcp port -$yes = 'Yes'; # visual representation of yes -$no = 'No'; # ditto for no -$user_interval = 11*60; # the interval between unsolicited prompts if no traffic +#$lang = 'en'; # default language +#$clusteraddr = '127.0.0.1'; # cluster tcp host address - used for things like console.pl +#$clusterport = 27754; # cluster tcp port +#$yes = 'Yes'; # visual representation of yes +#$no = 'No'; # ditto for no +#$user_interval = 11*60; # the interval between unsolicited prompts if no traffic # make sure that modules are searched in the order local then perl BEGIN { @@ -166,6 +166,13 @@ use strict; use Local; +$lang //= 'en'; # default language +$clusteraddr //= '127.0.0.1'; # cluster tcp host address - used for things like console.pl +$clusterport //= 27754; # cluster tcp port +$yes //= 'Yes'; # visual representation of yes +$no //= 'No'; # ditto for no +$user_interval //= 11*60; # the interval between unsolicited prompts if no traffic + @inqueue = (); # the main input queue, an array of hashes $systime = 0; # the time now (in seconds) diff --git a/perl/console.pl b/perl/console.pl index 7e725029..32c6cf5f 100755 --- a/perl/console.pl +++ b/perl/console.pl @@ -27,8 +27,6 @@ BEGIN { $is_win = ($^O =~ /^MS/ || $^O =~ /^OS-2/) ? 1 : 0; # is it Windows? } -$clusteraddr = '127.0.0.1'; -$clusterport = 27754; use Mojo::IOLoop; @@ -51,6 +49,9 @@ use Console; # initialisation # +$clusteraddr //= '127.0.0.1'; +$clusterport //= 27754; + $call = ""; # the callsign being used $node = ""; # the node callsign being used $conn = 0; # the connection object for the cluster