summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings2/lancard/lancardrun.cpp
Side-by-side diff
Diffstat (limited to 'noncore/settings/networksettings2/lancard/lancardrun.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/settings/networksettings2/lancard/lancardrun.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/noncore/settings/networksettings2/lancard/lancardrun.cpp b/noncore/settings/networksettings2/lancard/lancardrun.cpp
index b3b592b..951756d 100644
--- a/noncore/settings/networksettings2/lancard/lancardrun.cpp
+++ b/noncore/settings/networksettings2/lancard/lancardrun.cpp
@@ -36,7 +36,16 @@ void LanCardRun::detectState( NodeCollection * NC ) {
}
}
- // we are certainly not UP
+ if( ( Run = assignedInterface() ) ) {
+ // we already have an interface assigned -> still present ?
+ if( ! Run->IsUp ) {
+ // usb is still free -> keep assignment
+ NC->setCurrentState( Available );
+ return;
+ } // else interface is up but NOT us -> some other profile
+ }
+
+ // nothing (valid) assigned to us
assignInterface( 0 );
// find possible interface
@@ -87,8 +96,7 @@ bool LanCardRun::setState( NodeCollection * NC, Action_t A ) {
if( ! connection()->setState( Down ) )
// could not ...
return 0;
- }
- if( NC->currentState() != Available ) {
+ } else if( NC->currentState() != Available ) {
return 1;
}
assignedInterface()->assignNode( 0 ); // release