projects
/
spider.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add CTY-3304
[spider.git]
/
perl
/
DXProt.pm
diff --git
a/perl/DXProt.pm
b/perl/DXProt.pm
index 09ab54512c6a2a231527ad18d1225c12237f0c2b..a16ec89f9dbe20ee1c33fe4ae4f4f1cb17c8abdd 100644
(file)
--- a/
perl/DXProt.pm
+++ b/
perl/DXProt.pm
@@
-33,6
+33,7
@@
use Route;
use Route::Node;
use Script;
use DXProtHandle;
use Route::Node;
use Script;
use DXProtHandle;
+use DXCIDR;
use strict;
use strict;
@@
-246,8
+247,9
@@
sub init
$main::me->{pingave} = 0;
$main::me->{registered} = 1;
$main::me->{version} = $main::version;
$main::me->{pingave} = 0;
$main::me->{registered} = 1;
$main::me->{version} = $main::version;
- $main::me->{build} =
"$main::subversion.$main::build"
;
+ $main::me->{build} =
$main::build
;
$main::me->{do_pc9x} = 1;
$main::me->{do_pc9x} = 1;
+ $main::me->{hostname} = $main::clusteraddr;
$main::me->update_pc92_next($pc92_short_update_period);
$main::me->update_pc92_keepalive;
}
$main::me->update_pc92_next($pc92_short_update_period);
$main::me->update_pc92_keepalive;
}
@@
-288,7
+290,9
@@
sub start
# log it
my $host = $self->{conn}->peerhost;
$host ||= "AGW Port #$self->{conn}->{agwport}" if exists $self->{conn}->{agwport};
# log it
my $host = $self->{conn}->peerhost;
$host ||= "AGW Port #$self->{conn}->{agwport}" if exists $self->{conn}->{agwport};
+ $host ||= $host if is_ipaddr($host);
$host ||= "unknown";
$host ||= "unknown";
+ $self->{hostname} = $host;
Log('DXProt', "$call connected from $host");
Log('DXProt', "$call connected from $host");
@@
-430,9
+434,9
@@
sub normal
my $sub = "handle_$pcno";
if ($self->can($sub)) {
my $sub = "handle_$pcno";
if ($self->can($sub)) {
- $self->$sub($pcno, $line, $origin, @field);
+ $self->$sub($pcno, $line, $origin,
\
@field);
} else {
} else {
- $self->handle_default($pcno, $line, $origin, @field);
+ $self->handle_default($pcno, $line, $origin,
\
@field);
}
}
}
}
@@
-552,7
+556,9
@@
sub send_dx_spot
# taking into account filtering and so on
foreach $dxchan (@dxchan) {
next if $dxchan == $main::me;
# taking into account filtering and so on
foreach $dxchan (@dxchan) {
next if $dxchan == $main::me;
- next if $dxchan == $self && $self->is_node;
+# next if $dxchan == $self && $self->is_node;
+ next if $dxchan == $self; # the spot is sent back to me by dx command
+
if ($line =~ /PC61/ && !($dxchan->is_spider || $dxchan->is_user)) {
unless ($pc11) {
my @f = split /\^/, $line;
if ($line =~ /PC61/ && !($dxchan->is_spider || $dxchan->is_user)) {
unless ($pc11) {
my @f = split /\^/, $line;