Improve M$ Windows compatibility
[spider.git] / perl / DXChannel.pm
index 29919c7ebcf4eb7df53c97dbe0ebc495d30819cb..dcd7b909bf25af8983044ace748da460efb896eb 100644 (file)
@@ -175,6 +175,7 @@ sub alloc
        $self->{lang} = $main::lang if !$self->{lang};
        $self->{func} = "";
        $self->{width} ||=  80;
+       $self->{_nospawn} = 0;
 
        # add in all the dxcc, itu, zone info
        my @dxcc = Prefix::extract($call);
@@ -185,6 +186,11 @@ sub alloc
        }
        $self->{inqueue} = [];
 
+       if ($conn) {
+               $self->{hostname} = $self->{conn}->peerhost;
+               $self->{sockhost} = $self->{conn}->sockhost;
+       }
+
        $count++;
        dbg("DXChannel $self->{call} created ($count)") if isdbg('chan');
        bless $self, $pkg; 
@@ -719,7 +725,7 @@ sub process_one
                if ($sort ne 'D') {
                        if (isdbg('chan')) {
                                if (($self->is_rbn && isdbg('rbnchan')) || !$self->is_rbn) {
-                                       dbg("<- $sort $call $line") if isdbg('chan');
+                                       dbg("<- $sort $call $line") if isdbg('chan'); # you may think this is tautology, but it's needed get the correct label on the debug line
                                }
                        }
                }