fixed duplicate spot, always make clean ending
[spider.git] / perl / DXChannel.pm
index 674f835599bf972738bd06993bbb5b71606a413f..60b36331df668ac1ec10f6e3dcaf4c57e7310241 100644 (file)
@@ -82,6 +82,7 @@ $count = 0;
                  isolate => '5,Isolate network,yesno',
                  isslugged => '9,Still Slugged,yesno',
                  itu => '0,ITU Zone',
+                 K => '9,Seen on PC92 K,yesno',
                  lang => '0,Language',
                  lastmsgpoll => '0,Last Msg Poll,atime',
                  lastping => '5,Ping last sent,atime',
@@ -136,17 +137,17 @@ $count = 0;
 $maxerrors = 20;                               # the maximum number of concurrent errors allowed before disconnection
 
 # object destruction
-sub DESTROY
-{
-       my $self = shift;
-       for (keys %$self) {
-               if (ref($self->{$_})) {
-                       delete $self->{$_};
-               }
-       }
-       dbg("DXChannel $self->{call} destroyed ($count)") if isdbg('chan');
-       $count--;
-}
+sub DESTROY
+{
+#      my $self = shift;
+#      for (keys %$self) {
+#              if (ref($self->{$_})) {
+#                      delete $self->{$_};
+#              }
+#      }
+#      dbg("DXChannel $self->{call} destroyed ($count)") if isdbg('chan');
+#      $count--;
+}
 
 # create a new channel object [$obj = DXChannel->new($call, $msg_conn_obj, $user_obj)]
 sub alloc
@@ -256,7 +257,7 @@ sub get_all_node_calls
        my $ref;
        my @out;
        foreach $ref (values %channels) {
-               push @out, $ref->{call} if $ref->is_node;
+               push @out, $ref->{call} if $ref && $ref->is_node;
        }
        return @out;
 }
@@ -267,7 +268,7 @@ sub get_all_users
        my $ref;
        my @out;
        foreach $ref (values %channels) {
-               push @out, $ref if $ref->is_user;
+               push @out, $ref if $ref &&  $ref->is_user;
        }
        return @out;
 }