try to fix protocol version
[spider.git] / perl / cluster.pl
index 6ad2a0ad8b3edce0dc05fdffe3a107cb99e41938..af1fe2e70cc26e8abd6f08b8b7b9accdf9269029 100755 (executable)
@@ -267,7 +267,7 @@ DXProt->init();
 Aranea->init();
 
 # put in a DXCluster node for us here so we can add users and take them away
-$routeroot = Route::Node->new($mycall, $version*100+5252, Route::here($main::me->here)|Route::conf($main::me->conf));
+$routeroot = Route::Node->new($mycall, int($version*100)+$DXProt::myprot_version, $main::me->here);
 
 # make sure that there is a routing OUTPUT node default file
 #unless (Filter::read_in('route', 'node_default', 0)) {
@@ -377,7 +377,7 @@ sub new_channel
        # set up the basic channel info
        # is there one already connected to me - locally? 
        my $user = DXUser->get_current($call);
-       my $dxchan = DXChannel->get($call);
+       my $dxchan = DXChannel::get($call);
        if ($dxchan) {
                if ($user && $user->is_node) {
                        already_conn($conn, $call, DXM::msg($lang, 'concluster', $call, $main::mycall));
@@ -459,13 +459,13 @@ sub cease
        dbg("Local::finish error $@") if $@;
 
        # disconnect nodes
-       foreach $dxchan (DXChannel->get_all_nodes) {
+       foreach $dxchan (grep {$_->is_node || $_->is_aranea} DXChannel::get_all()) {
            $dxchan->disconnect(2) unless $dxchan == $main::me;
        }
        Msg->event_loop(100, 0.01);
 
        # disconnect users
-       foreach $dxchan (DXChannel->get_all_users) {
+       foreach $dxchan (DXChannel::get_all_users) {
                $dxchan->disconnect;
        }