projects
/
spider.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
an AFAIK nominally working (for one connection) version
[spider.git]
/
perl
/
DXChannel.pm
diff --git
a/perl/DXChannel.pm
b/perl/DXChannel.pm
index 580783a6a466383f2ae8fac35106c03d2f38e38f..829c6b55585bf0022e6f96c28a17be6d368d5798 100644
(file)
--- a/
perl/DXChannel.pm
+++ b/
perl/DXChannel.pm
@@
-85,7
+85,7
@@
$count = 0;
inwcyfilter => '5,WCY Filt-inp',
inspotsfilter => '5,Spot Filt-inp',
inroutefilter => '5,Route Filt-inp',
inwcyfilter => '5,WCY Filt-inp',
inspotsfilter => '5,Spot Filt-inp',
inroutefilter => '5,Route Filt-inp',
- passwd => '9,Passwd List,
parray
',
+ passwd => '9,Passwd List,
yesno
',
pingint => '5,Ping Interval ',
nopings => '5,Ping Obs Count',
lastping => '5,Ping last sent,atime',
pingint => '5,Ping Interval ',
nopings => '5,Ping Obs Count',
lastping => '5,Ping last sent,atime',
@@
-108,11
+108,17
@@
$count = 0;
metric => '1,Route metric',
badcount => '1,Bad Word Count',
edit => '7,Edit Function',
metric => '1,Route metric',
badcount => '1,Bad Word Count',
edit => '7,Edit Function',
+ registered => '9,Registered?,yesno',
+ prompt => '0,Required Prompt',
+ version => '1,Node Version',
+ build => '1,Node Build',
+ verified => '9,Verified?,yesno',
+ newroute => '1,New Style Routing,yesno',
);
use vars qw($VERSION $BRANCH);
$VERSION = sprintf( "%d.%03d", q$Revision$ =~ /(\d+)\.(\d+)/ );
);
use vars qw($VERSION $BRANCH);
$VERSION = sprintf( "%d.%03d", q$Revision$ =~ /(\d+)\.(\d+)/ );
-$BRANCH = sprintf( "%d.%03d", q$Revision$ =~ /\d+\.\d+\.(\d+)\.(\d+)/
) || 0
;
+$BRANCH = sprintf( "%d.%03d", q$Revision$ =~ /\d+\.\d+\.(\d+)\.(\d+)/
|| (0,0))
;
$main::build += $VERSION;
$main::branch += $BRANCH;
$main::build += $VERSION;
$main::branch += $BRANCH;
@@
-297,6
+303,15
@@
sub sort
return @_ ? $self->{'sort'} = shift : $self->{'sort'} ;
}
return @_ ? $self->{'sort'} = shift : $self->{'sort'} ;
}
+# find out whether we are prepared to believe this callsign on this interface
+sub is_believed
+{
+ my $self = shift;
+ my $call = shift;
+
+ return grep $call eq $_, $self->user->believe;
+}
+
# handle out going messages, immediately without waiting for the select to drop
# this could, in theory, block
sub send_now
# handle out going messages, immediately without waiting for the select to drop
# this could, in theory, block
sub send_now
@@
-421,6
+436,7
@@
sub disconnect
my $self = shift;
my $user = $self->{user};
my $self = shift;
my $user = $self->{user};
+ main::clean_inqueue($self); # clear out any remaining incoming frames
$user->close() if defined $user;
$self->{conn}->disconnect;
$self->del();
$user->close() if defined $user;
$self->{conn}->disconnect;
$self->del();
@@
-492,12
+508,12
@@
sub decode_input
# the above regexp must work
unless (defined $sort && defined $call && defined $line) {
# $data =~ s/([\x00-\x1f\x7f-\xff])/uc sprintf("%%%02x",ord($1))/eg;
# the above regexp must work
unless (defined $sort && defined $call && defined $line) {
# $data =~ s/([\x00-\x1f\x7f-\xff])/uc sprintf("%%%02x",ord($1))/eg;
- dbg("DUFF Line on $chcall: $data")
if isdbg('err')
;
+ dbg("DUFF Line on $chcall: $data");
return ();
}
if(ref($dxchan) && $call ne $chcall) {
return ();
}
if(ref($dxchan) && $call ne $chcall) {
- dbg("DUFF Line come in for $call on wrong channel $chcall")
if isdbg('err')
;
+ dbg("DUFF Line come in for $call on wrong channel $chcall");
return();
}
return();
}
@@
-508,19
+524,20
@@
sub rspfcheck
{
my ($self, $flag, $node, $user) = @_;
my $nref = Route::Node::get($node);
{
my ($self, $flag, $node, $user) = @_;
my $nref = Route::Node::get($node);
- my $dxchan = $nref->dxchan if $nref;
+ my $dxchan = $nref->
best
dxchan if $nref;
if ($nref && $dxchan) {
if ($dxchan == $self) {
return 1 unless $user;
if ($nref && $dxchan) {
if ($dxchan == $self) {
return 1 unless $user;
+ return 1 if $user eq $node;
my @users = $nref->users;
return 1 if @users == 0 || grep $user eq $_, @users;
my @users = $nref->users;
return 1 if @users == 0 || grep $user eq $_, @users;
- dbg("RSPF: $user not on $node") if isdbg('
rspf
');
+ dbg("RSPF: $user not on $node") if isdbg('
chanerr
');
} else {
} else {
- dbg("RSPF: Shortest path for $node is " . $nref->
dxchan->{call}) if isdbg('rspf
');
+ dbg("RSPF: Shortest path for $node is " . $nref->
bestdxchan->{call}) if isdbg('chanerr
');
}
} else {
return 1 if $flag;
}
} else {
return 1 if $flag;
- dbg("RSPF: required $node not found" ) if isdbg('
rspf
');
+ dbg("RSPF: required $node not found" ) if isdbg('
chanerr
');
}
return 0;
}
}
return 0;
}
@@
-617,20
+634,20
@@
sub broadcast_list
}
}
-no strict;
+
#
no strict;
sub AUTOLOAD
{
sub AUTOLOAD
{
-
my $self = shif
t;
+
no stric
t;
my $name = $AUTOLOAD;
return if $name =~ /::DESTROY$/;
my $name = $AUTOLOAD;
return if $name =~ /::DESTROY$/;
- $name =~ s/.*:://o;
+ $name =~ s/
^
.*:://o;
confess "Non-existant field '$AUTOLOAD'" if !$valid{$name};
# this clever line of code creates a subroutine which takes over from autoload
# from OO Perl - Conway
confess "Non-existant field '$AUTOLOAD'" if !$valid{$name};
# this clever line of code creates a subroutine which takes over from autoload
# from OO Perl - Conway
- *
{$AUTOLOAD} = sub {@_ > 1 ? $_[0]->{$name} = $_[1] : $_[0]->{$name}}
;
-
@_ ? $self->{$name} = shift : $self->{$name}
;
+ *
$AUTOLOAD = sub {@_ > 1 ? $_[0]->{$name} = $_[1] : $_[0]->{$name}}
;
+
goto &$AUTOLOAD
;
}
}