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 6ded9e8efa9ab7e7ead5201c88a063822f791509..829c6b55585bf0022e6f96c28a17be6d368d5798 100644
(file)
--- a/
perl/DXChannel.pm
+++ b/
perl/DXChannel.pm
@@
-110,11
+110,15
@@
$count = 0;
edit => '7,Edit Function',
registered => '9,Registered?,yesno',
prompt => '0,Required Prompt',
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;
@@
-299,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
@@
-423,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();
@@
-510,7
+524,7
@@
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;
@@
-519,7
+533,7
@@
sub rspfcheck
return 1 if @users == 0 || grep $user eq $_, @users;
dbg("RSPF: $user not on $node") if isdbg('chanerr');
} else {
return 1 if @users == 0 || grep $user eq $_, @users;
dbg("RSPF: $user not on $node") if isdbg('chanerr');
} else {
- dbg("RSPF: Shortest path for $node is " . $nref->dxchan->{call}) if isdbg('chanerr');
+ dbg("RSPF: Shortest path for $node is " . $nref->
best
dxchan->{call}) if isdbg('chanerr');
}
} else {
return 1 if $flag;
}
} else {
return 1 if $flag;
@@
-620,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
;
}
}