Ignore:
Timestamp:
01/13/03 18:18:15 (22 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Cosy/candrv/network.cc

    r1701 r1702  
    240240            if (!fNodes[i]->IsZombieNode())
    241241                fNodeInitialized[i] = TRUE;
    242             else
    243                 fNodes[i]=NULL;
     242            /*else
     243                fNodes[i]=NULL;*/
    244244        }
    245245    lout << "- All Nodes setup." << endl;
     
    288288    return rc;
    289289}
     290
     291// --------------------------------------------------------------------------
     292//
     293// returns true if one of the nodes is a zombie node
     294//
     295bool Network::HasZombie() const
     296{
     297    for (int i=0; i<32; i++)
     298        if (fNodes[i])
     299            if (fNodes[i]->IsZombieNode())
     300                return true;
     301
     302    return false;
     303}
     304
     305// --------------------------------------------------------------------------
     306//
     307// try to reboot all zombie nodes to get them working again. all other
     308// nodes are left untouched.
     309//
     310bool Network::RebootZombies()
     311{
     312    lout << "- Trying to reboot all Zombies..." << endl;
     313    for (int i=0; i<32; i++)
     314        if (fNodes[i])
     315            if (fNodes[i]->IsZombieNode())
     316                if (!fNodes[i]->Reboot())
     317                {
     318                    lout << "- Failed to reboot " << fNodes[i]->GetNodeName() << "." << endl;
     319                    return false;
     320                }
     321
     322    lout << "- All Zombies rebooted." << endl;
     323
     324    return true;
     325}
Note: See TracChangeset for help on using the changeset viewer.