fixed a missing get_all_user_calls
authordjk <djk>
Sun, 21 Nov 1999 16:38:19 +0000 (16:38 +0000)
committerdjk <djk>
Sun, 21 Nov 1999 16:38:19 +0000 (16:38 +0000)
perl/DXChannel.pm
perl/DXProt.pm
perl/cluster.pl

index de9ecaa7540c5a9386853ad4610d19ebd86fbfbf..4ded62674e5a1c263fe2eda3c5569b4ee0be0b3b 100644 (file)
@@ -346,8 +346,9 @@ sub disconnect
        my $user = $self->{user};
        my $conn = $self->{conn};
        my $call = $self->{call};
+    my $nopc39 = shift || 0;
        
-       $self->finish();
+       $self->finish($nopc39);
        $conn->send_now("Z$call|bye") if $conn; # this will cause 'client' to disconnect
        $user->close() if defined $user;
        $conn->disconnect() if $conn;
index 64727b8a7d993b3e9ba480ac1871ae780dcaf922..e65cad70a799ddc53af94e0fb45279ca2745d201 100644 (file)
@@ -190,7 +190,7 @@ sub normal
                        
                        # is it for me or one of mine?
                        my $call = ($field[5] gt ' ') ? $field[5] : $field[2];
-                       if ($call eq $main::mycall || grep $_ eq $call, get_all_user_calls()) {
+                       if ($call eq $main::mycall || grep $_ eq $call, DXChannel::get_all_user_calls()) {
                                
                                # yes, it is
                                my $text = unpad($field[3]);
@@ -818,9 +818,10 @@ sub finish
 {
        my $self = shift;
        my $call = $self->call;
+       my $nopc39 = shift;
        my $ref = DXCluster->get_exact($call);
        
-       $self->send_now("D", DXProt::pc39($main::mycall, $self->msg('disc1', "System Op")));
+       $self->send_now("D", DXProt::pc39($main::mycall, $self->msg('disc1', "System Op"))) unless $nopc39;
        
        # unbusy and stop and outgoing mail
        my $mref = DXMsg::get_busy($call);
index 64cbab11ed1d6efc69ed2adc3f6896eb85ca8dee..d9827a651fc8daf635f886aae7ef1fd6dbfdf717 100755 (executable)
@@ -94,7 +94,7 @@ sub already_conn
        dbg('chan', "-> Z $call bye\n");
        $conn->send_now("Z$call|bye"); # this will cause 'client' to disconnect
        sleep(1);
-       $conn->disconnect;
+       $conn->disconnect();
 }
 
 # handle incoming messages
@@ -105,7 +105,7 @@ sub rec
        
        if (defined $err && $err) {
                if ($dxchan) {
-                       disconnect($dxchan);
+                       $dxchan->disconnect;
                }
                return;
        }
@@ -184,9 +184,9 @@ sub cease
        };
        dbg('local', "Local::finish error $@") if $@;
 
-       # disconnect users
+       # disconnect nodes
        foreach $dxchan (DXChannel->get_all()) {
-               next if $dxchan->is_ak1a;
+               next unless $dxchan->is_ak1a;
                disconnect($dxchan) unless $dxchan == $DXProt::me;
        }
        Msg->event_loop(1, 0.05);
@@ -196,9 +196,9 @@ sub cease
        Msg->event_loop(1, 0.05);
        Msg->event_loop(1, 0.05);
 
-       # disconnect nodes
+       # disconnect users
        foreach $dxchan (DXChannel->get_all()) {
-               next unless $dxchan->is_ak1a;
+               next if $dxchan->is_ak1a;
                disconnect($dxchan) unless $dxchan == $DXProt::me;
        }
        Msg->event_loop(1, 0.05);
@@ -207,12 +207,6 @@ sub cease
        Msg->event_loop(1, 0.05);
        Msg->event_loop(1, 0.05);
        Msg->event_loop(1, 0.05);
-       Msg->event_loop(1, 0.05);
-       Msg->event_loop(1, 0.05);
-       Msg->event_loop(1, 0.05);
-       Msg->event_loop(1, 0.05);
-       Msg->event_loop(1, 0.05);
-       Msg->event_loop(1, 0.05);
        DXUser::finish();
 
        # close all databases