]> dxcluster.org Git - spider.git/commitdiff
allow out going frames :-)
authorminima <minima>
Tue, 27 Mar 2001 23:26:01 +0000 (23:26 +0000)
committerminima <minima>
Tue, 27 Mar 2001 23:26:01 +0000 (23:26 +0000)
perl/AGWMsg.pm

index d80f423547184c456a46bce03a512c13b33b7d53..26939af9140e9d9784b48684f0aba209ddc67e9c 100644 (file)
@@ -262,6 +262,9 @@ sub _decode
                        }
                } else {
                        $conn = AGWMsg->new($rproc);
+                       $conn->{agwpid} = $pid;
+                       $conn->{agwport} = $port;
+                       $conn->{lineend} = "\cR";
                        $conn->to_connected($call, 'A', $conn->{csort} = 'ax25');
                }
        } elsif ($sort eq 'd') {
@@ -309,9 +312,17 @@ sub in_disconnect
 sub disconnect
 {
        my $conn = shift;
-       _sendf('d', $main::mycall, $conn->{call});
+       _sendf('d', $main::mycall, $conn->{call}, $conn->{agwport});
        $conn->SUPER->disconnect;
 }
 
+sub enqueue
+{
+       my ($conn, $msg) = @_;
+       if ($msg =~ /^[D]/) {
+               $msg =~ s/^[-\w]+\|//;
+               _sendf('D', $main::mycall, $conn->{call}, $conn->{agwport}, $conn->{agwpid}, $msg . $conn->{lineend});
+       }
+}
 1;