From 8d2d2664e5f544b8292806e617deb7a0e4170dc0 Mon Sep 17 00:00:00 2001 From: wimpie Date: Sun, 04 Apr 2004 11:42:05 +0000 Subject: Error in generation of files --- (limited to 'noncore/settings/networksettings2/profile/profilerun.cpp') diff --git a/noncore/settings/networksettings2/profile/profilerun.cpp b/noncore/settings/networksettings2/profile/profilerun.cpp index 90c37ed..feebf86 100644 --- a/noncore/settings/networksettings2/profile/profilerun.cpp +++ b/noncore/settings/networksettings2/profile/profilerun.cpp @@ -19,25 +19,23 @@ bool ProfileRun::setState( NodeCollection * NC, Action_t A ) { switch ( A ) { case Enable : if( NC->currentState() == Disabled ) { + Data->Disabled = 0; NC->setCurrentState( Off ); // at least // ... but request deeper NNNI->runtime()->detectState(NC); - return 1; } return 1; case Disable : - if( NC->currentState() == IsUp ) { - // bring down -> make available - NNNI->runtime()->setState(NC, Down); - } - if( NC->currentState() == Available ) { - // make unavailable - NNNI->runtime()->setState(NC, Deactivate); - } - if( NC->currentState() > Available ) { - // could not disable - return 0; + switch( NC->currentState() ) { + case IsUp : + case Available : + // bring Deactivate (will bring down) + if( ! NNNI->runtime()->setState(NC, Deactivate) ) + return 0; + default : + break; } + Data->Disabled = 1; NC->setCurrentState( Disabled ); return 1; default : -- cgit v0.9.0.2