From: minima Date: Thu, 24 Feb 2005 13:30:51 +0000 (+0000) Subject: fix here so that it is either on or off and remove all the Route::here X-Git-Tag: R_1_52~141 X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=2841b340579dae85808c5a571df3140b736c2fb2;p=spider.git fix here so that it is either on or off and remove all the Route::here and Route::conf stuff --- diff --git a/perl/DXCommandmode.pm b/perl/DXCommandmode.pm index 72144d91..753f59f7 100644 --- a/perl/DXCommandmode.pm +++ b/perl/DXCommandmode.pm @@ -68,7 +68,7 @@ sub new # routing, this must go out here to prevent race condx my $pkg = shift; my $call = shift; - my @rout = $main::routeroot->add_user($call, Route::here(1)); + my @rout = $main::routeroot->add_user($call, 1); my $ref = Route::User::get($call); diff --git a/perl/DXProt.pm b/perl/DXProt.pm index f00a436a..595cfae8 100644 --- a/perl/DXProt.pm +++ b/perl/DXProt.pm @@ -239,7 +239,7 @@ sub new # add this node to the table, the values get filled in later my $pkg = shift; my $call = shift; - $main::routeroot->add($call, '5000', Route::here(1)) if $call ne $main::mycall; + $main::routeroot->add($call, '5000', 1) if $call ne $main::mycall; return $self; } @@ -811,7 +811,7 @@ sub handle_16 } $r = Route::User::get($call); - my $flags = Route::here($here)|Route::conf($conf); + my $flags = $here; if ($r) { my $au = $r->addparent($parent); @@ -970,7 +970,7 @@ sub handle_19 if ($origin ne $self->call) { my $op = Route::Node::get($origin); unless ($op) { - $op = $parent->add($origin, 5000, Route::here(1)); + $op = $parent->add($origin, 5000, 1); my $user = DXUser->get_current($origin); if (!$user) { $user = DXUser->new($origin); @@ -1044,7 +1044,7 @@ sub handle_19 } my $r = Route::Node::get($call); - my $flags = Route::here($here)|Route::conf($conf); + my $flags = $here; # is he under the control of the new protocol? if ($r && $r->np) { diff --git a/perl/Route.pm b/perl/Route.pm index 019ba1e3..0676139a 100644 --- a/perl/Route.pm +++ b/perl/Route.pm @@ -70,7 +70,7 @@ sub new ($self->{dxcc}, $self->{itu}, $self->{cq}, $self->{state}, $self->{city}) = Prefix::cty_data($call); - $self->{flags} = here(1); + $self->{flags} = 1; return $self; } @@ -134,13 +134,6 @@ sub is_empty return @{$self->{$_[0]}} == 0; } -sub is_aranea -{ - my $self = shift; - $self->{aranea} = shift if @_; - return $self->{aranea}; -} - # # flag field constructors/enquirers # @@ -156,21 +149,15 @@ sub is_aranea sub here { my $self = shift; - my $r = shift; - return $self ? 1 : 0 unless ref $self; - return ($self->{flags} & 1) ? 1 : 0 unless defined $r; - $self->{flags} = (($self->{flags} & ~1) | ($r ? 1 : 0)); - return $r ? 1 : 0; + $self->{flags} = shift if @_; + return $self->{flags}; } +# conferencing in the ak1a sense is not supported sub conf { my $self = shift; - my $r = shift; - return $self ? 2 : 0 unless ref $self; - return ($self->{flags} & 2) ? 2 : 0 unless defined $r; - $self->{flags} = (($self->{flags} & ~2) | ($r ? 2 : 0)); - return $r ? 2 : 0; + return 0; } sub parents diff --git a/perl/cluster.pl b/perl/cluster.pl index d7b3228f..1f225b59 100755 --- a/perl/cluster.pl +++ b/perl/cluster.pl @@ -267,7 +267,7 @@ 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+5252, Route::here($main::me->here)|Route::conf($main::me->conf)); +$routeroot = Route::Node->new($mycall, $version*100+5252, $main::me->here); # make sure that there is a routing OUTPUT node default file #unless (Filter::read_in('route', 'node_default', 0)) {