summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings2/network/networkrun.cpp
Unidiff
Diffstat (limited to 'noncore/settings/networksettings2/network/networkrun.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/settings/networksettings2/network/networkrun.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/noncore/settings/networksettings2/network/networkrun.cpp b/noncore/settings/networksettings2/network/networkrun.cpp
index f34fdbf..ddb9a5f 100644
--- a/noncore/settings/networksettings2/network/networkrun.cpp
+++ b/noncore/settings/networksettings2/network/networkrun.cpp
@@ -1,24 +1,25 @@
1#include <system.h> 1#include <system.h>
2#include <asdevice.h> 2#include <asdevice.h>
3#include "networkrun.h" 3#include "networkrun.h"
4 4
5void NetworkRun::detectState( NodeCollection * NC ) { 5void NetworkRun::detectState( NodeCollection * NC ) {
6 RuntimeInfo * RI = netNode()->nextNode()->runtime(); 6 RuntimeInfo * RI = netNode()->nextNode()->runtime();
7 AsDevice * Next = RI->asDevice(); 7 AsDevice * Next = RI->asDevice();
8 InterfaceInfo * II = Next->assignedInterface(); 8 InterfaceInfo * II = Next->assignedInterface();
9 9
10 if( II ) { 10 if( II ) {
11 // device has assigned interface 11 // device has assigned interface
12 NC->setCurrentState( (( II->IsUp ) ? IsUp : Available) ); 12 NC->setCurrentState( (( II->IsUp ) ? IsUp : Available) );
13 return;
13 } 14 }
14 15
15 // has no interface -> delegate 16 // has no interface -> delegate
16 RI->detectState( NC ); 17 RI->detectState( NC );
17} 18}
18 19
19bool NetworkRun::setState( NodeCollection * NC, Action_t A ) { 20bool NetworkRun::setState( NodeCollection * NC, Action_t A ) {
20 // we handle UP and DOWN 21 // we handle UP and DOWN
21 RuntimeInfo * RI = netNode()->nextNode()->runtime(); 22 RuntimeInfo * RI = netNode()->nextNode()->runtime();
22 AsDevice * Next = RI->asDevice(); 23 AsDevice * Next = RI->asDevice();
23 InterfaceInfo * II = Next->assignedInterface(); 24 InterfaceInfo * II = Next->assignedInterface();
24 25