- # fill in various forwarding state variables
- $ref->{fromnode} = $fromnode;
- $ref->{tonode} = $f[1];
- $ref->{rrreq} = $f[11];
- $ref->{linesreq} = $f[10];
- $ref->{stream} = $stream;
- $ref->{count} = 0; # no of lines between PC31s
- dbg('msg', "new message from $f[4] to $f[3] '$f[8]' stream $stream\n");
- Log('msg', "Incoming message $f[4] to $f[3] '$f[8]'" );
- $work{"$fromnode$stream"} = $ref; # store in work
- $busy{$fromnode} = $ref; # set interlock
- $self->send(DXProt::pc30($fromnode, $f[1], $stream)); # send ack
- $ref->{lastt} = $main::systime;
-
- # look to see whether this is a non private message sent to a known callsign
- my $uref = DXUser->get_current($ref->{to});
- if (is_callsign($ref->{to}) && !$ref->{private} && $uref && $uref->homenode) {
- $ref->{private} = 1;
- dbg('msg', "set bull to $ref->{to} to private");
- }
- last SWITCH;
- }
-
- if ($pcno == 29) { # incoming text
- my $ref = $work{"$f[2]$f[3]"};
- if ($ref) {
- $f[4] =~ s/\%5E/^/g;
- push @{$ref->{lines}}, $f[4];
- $ref->{count}++;
- if ($ref->{count} >= $ref->{linesreq}) {
- $self->send(DXProt::pc31($f[2], $f[1], $f[3]));
- dbg('msg', "stream $f[3]: $ref->{count} lines received\n");
- $ref->{count} = 0;
- }
- $ref->{lastt} = $main::systime;
- } else {
- dbg('msg', "PC29 from unknown stream $f[3] from $f[2]" );
- $self->send(DXProt::pc42($f[2], $f[1], $f[3])); # unknown stream
- }
- last SWITCH;
- }
+ # fill in various forwarding state variables
+ $ref->{fromnode} = $fromnode;
+ $ref->{tonode} = $tonode;
+ $ref->{rrreq} = $_[11];
+ $ref->{linesreq} = $_[10];
+ $ref->{stream} = $stream;
+ $ref->{count} = 0; # no of lines between PC31s
+ dbg("new message from $_[4] to $_[3] '$_[8]' stream $fromnode/$stream\n") if isdbg('msg');
+ Log('msg', "Incoming message $_[4] to $_[3] '$_[8]' origin: $origin" );
+ set_fwq($fromnode, $stream, $ref); # store in work
+ set_busy($fromnode, $ref); # set interlock
+ $dxchan->send(DXProt::pc30($fromnode, $tonode, $stream)); # send ack
+ $ref->{lastt} = $main::systime;
+
+ # look to see whether this is a non private message sent to a known callsign
+ my $uref = DXUser->get_current($ref->{to});
+ if (is_callsign($ref->{to}) && !$ref->{private} && $uref && $uref->homenode) {
+ $ref->{private} = 1;
+ dbg("set bull to $ref->{to} to private") if isdbg('msg');
+ Log('msg', "set bull to $ref->{to} to private");
+ }
+}