projects
/
spider.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
make PC29 output correct on empty lines
[spider.git]
/
perl
/
DXProt.pm
diff --git
a/perl/DXProt.pm
b/perl/DXProt.pm
index 73fcfc54ad42156d339db25f7e282a532fd606ce..f75d55c231e0c9b0e51ec79896d4c5de1ae48ff9 100644
(file)
--- a/
perl/DXProt.pm
+++ b/
perl/DXProt.pm
@@
-239,7
+239,7
@@
sub start
# send initialisation string
unless ($self->{outbound}) {
# send initialisation string
unless ($self->{outbound}) {
-
$self->send(pc38()) if DXNode->get_all();
+
#
$self->send(pc38()) if DXNode->get_all();
$self->send(pc18());
$self->{lastping} = $main::systime;
} else {
$self->send(pc18());
$self->{lastping} = $main::systime;
} else {
@@
-263,6
+263,8
@@
sub normal
{
my ($self, $line) = @_;
my @field = split /\^/, $line;
{
my ($self, $line) = @_;
my @field = split /\^/, $line;
+ return unless @field;
+
pop @field if $field[-1] eq '~';
# print join(',', @field), "\n";
pop @field if $field[-1] eq '~';
# print join(',', @field), "\n";
@@
-615,12
+617,16
@@
sub normal
if ($call ne $main::mycall) { # don't allow malicious buggers to disconnect me!
my $node = DXCluster->get_exact($call);
if ($node) {
if ($call ne $main::mycall) { # don't allow malicious buggers to disconnect me!
my $node = DXCluster->get_exact($call);
if ($node) {
+ if ($call eq $self->{call}) {
+ dbg('chan', "LOOP: Trying to disconnect myself with PC21");
+ return;
+ }
if ($node->dxchan != $self) {
dbg('chan', "LOOP: $call come in on wrong channel");
return;
}
my $dxchan;
if ($node->dxchan != $self) {
dbg('chan', "LOOP: $call come in on wrong channel");
return;
}
my $dxchan;
- if (
($dxchan = DXChannel->get($call)) && $dxchan != $self
) {
+ if (
$dxchan = DXChannel->get($call)
) {
dbg('chan', "LOOP: $call connected locally");
return;
}
dbg('chan', "LOOP: $call connected locally");
return;
}
@@
-1354,7
+1360,7
@@
sub broadcast_ak1a
{
my $s = shift; # the line to be rebroadcast
my @except = @_; # to all channels EXCEPT these (dxchannel refs)
{
my $s = shift; # the line to be rebroadcast
my @except = @_; # to all channels EXCEPT these (dxchannel refs)
- my @dxchan = DXChannel::get_all_
ak1a
();
+ my @dxchan = DXChannel::get_all_
nodes
();
my $dxchan;
# send it if it isn't the except list and isn't isolated and still has a hop count
my $dxchan;
# send it if it isn't the except list and isn't isolated and still has a hop count
@@
-1371,7
+1377,7
@@
sub broadcast_all_ak1a
{
my $s = shift; # the line to be rebroadcast
my @except = @_; # to all channels EXCEPT these (dxchannel refs)
{
my $s = shift; # the line to be rebroadcast
my @except = @_; # to all channels EXCEPT these (dxchannel refs)
- my @dxchan = DXChannel::get_all_
ak1a
();
+ my @dxchan = DXChannel::get_all_
nodes
();
my $dxchan;
# send it if it isn't the except list and isn't isolated and still has a hop count
my $dxchan;
# send it if it isn't the except list and isn't isolated and still has a hop count