X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?p=spider.git;a=blobdiff_plain;f=perl%2FDXChannel.pm;fp=perl%2FDXChannel.pm;h=60b36331df668ac1ec10f6e3dcaf4c57e7310241;hp=9c29464083476f9adb922ed46bd88ac41e8b3581;hb=770092d94f96b6d22a38fb33e0056b4779a8a1ab;hpb=12f4f4b66f10e158d0ed551f619356c787468567 diff --git a/perl/DXChannel.pm b/perl/DXChannel.pm index 9c294640..60b36331 100644 --- a/perl/DXChannel.pm +++ b/perl/DXChannel.pm @@ -137,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 @@ -257,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; } @@ -268,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; }