get alternate pinging working properly at half pingint
[spider.git] / perl / DXXml.pm
index 2d83e16bb61e0d6f4a16c1f86b785b48c9be59cb..b990410127167ac19f8339126fb215be371888df 100644 (file)
@@ -39,7 +39,7 @@ sub new
 {
        my $pkg = shift;
        my $class = ref $pkg || $pkg;
-       my $self = bless{@_}, $class;
+       my $self = bless{}, $class;
        while (@_) {
                my $key = shift;
                my $val = shift;
@@ -156,7 +156,6 @@ sub process
                                DXXml::Ping::add($main::me, $dxchan->call);
                                $dxchan->{nopings} -= 1;
                                $dxchan->{lastping} = $t;
-                               $dxchan->{lastping} += $dxchan->{pingint} / 2 unless @{$dxchan->{pingtime}};
                        }
                }
        }
@@ -271,22 +270,10 @@ sub route
                $dxchan->send($self->toxml);
        } elsif ($dxchan->is_node) {
                my $ref = $self->topcxx($dxchan);
-               if (ref $ref) {
-                       for (@$ref) {
-                               $dxchan->send($_);
-                       }
-               } else {
-                       $dxchan->send($ref);
-               }
+               $dxchan->send($ref);
        } else {
                my $ref = $self->tocmd($dxchan);
-               if (ref $ref) {
-                       for (@$ref) {
-                               $dxchan->send($_);
-                       }
-               } else {
-                       $dxchan->send($ref);
-               }
+               $dxchan->send($ref);
        }
 }