projects
/
spider.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
01f2793
)
at least the monitoring now works better
author
minima
<minima>
Wed, 28 Mar 2001 16:13:58 +0000
(16:13 +0000)
committer
minima
<minima>
Wed, 28 Mar 2001 16:13:58 +0000
(16:13 +0000)
perl/AGWMsg.pm
patch
|
blob
|
history
diff --git
a/perl/AGWMsg.pm
b/perl/AGWMsg.pm
index 23f2e1dd800ee9108fa50859784b51f810fbc306..dad1ed26ae0ccc14d32045506b6d4ed12fc6e30f 100644
(file)
--- a/
perl/AGWMsg.pm
+++ b/
perl/AGWMsg.pm
@@
-198,7
+198,7
@@
sub _decode
return unless $sock;
# we have at least 36 bytes of data (ugh!)
return unless $sock;
# we have at least 36 bytes of data (ugh!)
- my ($port, $sort, $pid, $from, $to, $len) = unpack('C x3 a1 x1 C x1
a10 a
10 V x4', $inmsg);
+ my ($port, $sort, $pid, $from, $to, $len) = unpack('C x3 a1 x1 C x1
Z10 Z
10 V x4', $inmsg);
my $data;
# do a sanity check on the length
my $data;
# do a sanity check on the length
@@
-227,15
+227,16
@@
sub _decode
$data = '' unless defined $data;
if ($sort eq 'D') {
$data = '' unless defined $data;
if ($sort eq 'D') {
- $data =~ s/[\cR\x00]//g;
- dbg('agw', "AGW Data In port: $port pid: $pid '$from'->'$to' length: $len \"$data\"");
+ my $d = unpack "Z*", $data;
+ $d =~ s/\cM$//;
+ dbg('agw', "AGW Data In port: $port pid: $pid '$from'->'$to' length: $len \"$d\"");
my $conn = Msg->conns($from eq $main::mycall ? $to : $from);
if ($conn) {
if ($conn->{state} eq 'WC') {
if (exists $conn->{cmd}) {
if (@{$conn->{cmd}}) {
my $conn = Msg->conns($from eq $main::mycall ? $to : $from);
if ($conn) {
if ($conn->{state} eq 'WC') {
if (exists $conn->{cmd}) {
if (@{$conn->{cmd}}) {
- dbg('connect', $
conn->{msg}
);
- $conn->_docmd($
conn->{msg}
);
+ dbg('connect', $
d
);
+ $conn->_docmd($
d
);
}
}
if ($conn->{state} eq 'WC' && exists $conn->{cmd} && @{$conn->{cmd}} == 0) {
}
}
if ($conn->{state} eq 'WC' && exists $conn->{cmd} && @{$conn->{cmd}} == 0) {
@@
-247,16
+248,20
@@
sub _decode
} else {
dbg('err', "AGW error Unsolicited Data!");
}
} else {
dbg('err', "AGW error Unsolicited Data!");
}
- } elsif ($sort eq 'I' || $sort eq 'S' || $sort eq 'U' || $sort eq 'M') {
- dbg('agw', "AGW Monitor \"$data\"");
+ } elsif ($sort eq 'I' || $sort eq 'S' || $sort eq 'U' || $sort eq 'M' || $sort eq 'T') {
+ my $d = unpack "Z*", $data;
+ $d =~ s/\cM$//;
+ dbg('agw', "AGW Monitor port: $port \"$d\"");
} elsif ($sort eq 'C') {
} elsif ($sort eq 'C') {
- dbg('agw', "AGW Connect port: $port pid: $pid '$from'->'$to'");
+ my $d = unpack "Z*", $data;
+ $d =~ s/\cM$//;
+ dbg('agw', "AGW Connect port: $port pid: $pid '$from'->'$to' \"$d\"");
my $call = $from eq $main::mycall ? $to : $from;
my $conn = Msg->conns($call);
if ($conn) {
if ($conn->{state} eq 'WC') {
if (exists $conn->{cmd} && @{$conn->{cmd}}) {
my $call = $from eq $main::mycall ? $to : $from;
my $conn = Msg->conns($call);
if ($conn) {
if ($conn->{state} eq 'WC') {
if (exists $conn->{cmd} && @{$conn->{cmd}}) {
- $conn->_docmd($d
ata
);
+ $conn->_docmd($d);
if ($conn->{state} eq 'WC' && exists $conn->{cmd} && @{$conn->{cmd}} == 0) {
$conn->to_connected($conn->{call}, 'O', $conn->{csort});
}
if ($conn->{state} eq 'WC' && exists $conn->{cmd} && @{$conn->{cmd}} == 0) {
$conn->to_connected($conn->{call}, 'O', $conn->{csort});
}
@@
-266,7
+271,7
@@
sub _decode
$conn = AGWMsg->new($rproc);
$conn->{agwpid} = $pid;
$conn->{agwport} = $port;
$conn = AGWMsg->new($rproc);
$conn->{agwpid} = $pid;
$conn->{agwport} = $port;
- $conn->{lineend} = "\c
R
";
+ $conn->{lineend} = "\c
M
";
$conn->{incoming} = 1;
$conn->{agwcall} = $call;
$conn->to_connected($call, 'A', $conn->{csort} = 'ax25');
$conn->{incoming} = 1;
$conn->{agwcall} = $call;
$conn->to_connected($call, 'A', $conn->{csort} = 'ax25');
@@
-306,7
+311,8
@@
sub _decode
_sendf('y', undef, undef, $i );
}
} else {
_sendf('y', undef, undef, $i );
}
} else {
- dbg('agw', "AGW decode $sort port: $port pid: $pid '$from'->'$to' length: $len \"$data\"");
+ my $d = unpack "Z*", $data;
+ dbg('agw', "AGW decode $sort port: $port pid: $pid '$from'->'$to' length: $len \"$d\"");
}
}
}
}
@@
-317,7
+323,7
@@
sub connect
my ($port, $call) = split /\s+/, $line;
$conn->{agwpid} = ord "\xF0";
$conn->{agwport} = $port - 1;
my ($port, $call) = split /\s+/, $line;
$conn->{agwpid} = ord "\xF0";
$conn->{agwport} = $port - 1;
- $conn->{lineend} = "\c
R
";
+ $conn->{lineend} = "\c
M
";
$conn->{incoming} = 0;
$conn->{csort} = 'ax25';
$conn->{agwcall} = uc $call;
$conn->{incoming} = 0;
$conn->{csort} = 'ax25';
$conn->{agwcall} = uc $call;