author | wimpie <wimpie> | 2004-04-04 11:42:05 (UTC) |
---|---|---|
committer | wimpie <wimpie> | 2004-04-04 11:42:05 (UTC) |
commit | 8d2d2664e5f544b8292806e617deb7a0e4170dc0 (patch) (side-by-side diff) | |
tree | 3e3764f82d52f8c32b0ed9d92c13ec483dc34114 /noncore/settings/networksettings2/network/networkrun.cpp | |
parent | 321f82bb3d43cbab358434fef52fe76f17e7d1e3 (diff) | |
download | opie-8d2d2664e5f544b8292806e617deb7a0e4170dc0.zip opie-8d2d2664e5f544b8292806e617deb7a0e4170dc0.tar.gz opie-8d2d2664e5f544b8292806e617deb7a0e4170dc0.tar.bz2 |
Error in generation of files
Diffstat (limited to 'noncore/settings/networksettings2/network/networkrun.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/networksettings2/network/networkrun.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/noncore/settings/networksettings2/network/networkrun.cpp b/noncore/settings/networksettings2/network/networkrun.cpp index 8deca14..f34fdbf 100644 --- a/noncore/settings/networksettings2/network/networkrun.cpp +++ b/noncore/settings/networksettings2/network/networkrun.cpp @@ -1,63 +1,65 @@ #include <system.h> #include <asdevice.h> #include "networkrun.h" void NetworkRun::detectState( NodeCollection * NC ) { RuntimeInfo * RI = netNode()->nextNode()->runtime(); AsDevice * Next = RI->asDevice(); InterfaceInfo * II = Next->assignedInterface(); if( II ) { // device has assigned interface NC->setCurrentState( (( II->IsUp ) ? IsUp : Available) ); } // has no interface -> delegate RI->detectState( NC ); } bool NetworkRun::setState( NodeCollection * NC, Action_t A ) { // we handle UP and DOWN RuntimeInfo * RI = netNode()->nextNode()->runtime(); AsDevice * Next = RI->asDevice(); InterfaceInfo * II = Next->assignedInterface(); if( A == Up ) { // we can bring UP if lower level is available if( NC->currentState() == Available ) { QString S; - S.sprintf( "ifup %s", II->Name.latin1() ); + S.sprintf( "ifup %s=%s-c%d-allowed", + II->Name.latin1(), II->Name.latin1(), + connection()->number() ); NSResources->system().execute( S ); - NC->setCurrentState( IsUp ); } return 1; } else if( A == Down ) { if( NC->currentState() == IsUp ) { QString S; - S.sprintf( "ifdown %s", II->Name.latin1() ); + S.sprintf( "ifdown %s=%s-c%d-allowed", + II->Name.latin1(), II->Name.latin1(), + connection()->number() ); NSResources->system().execute( S ); - NC->setCurrentState( Available ); } return 1; } // delegate return RI->setState( NC, A ); } bool NetworkRun::canSetState( State_t Curr, Action_t A ) { // we handle UP and DOWN RuntimeInfo * RI = netNode()->nextNode()->runtime(); if( A == Up ) { return ( Curr == Available ); } else if( A == Down ) { return ( Curr == IsUp ); } // delegate return RI->canSetState( Curr, A ); } bool NetworkRun::handlesInterface( const QString & S ) { // donno -> pass deeper return netNode()->nextNode()->runtime()->handlesInterface(S); } |