summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings2/lancard/lancardrun.cpp
authorwimpie <wimpie>2004-04-04 11:42:05 (UTC)
committer wimpie <wimpie>2004-04-04 11:42:05 (UTC)
commit8d2d2664e5f544b8292806e617deb7a0e4170dc0 (patch) (side-by-side diff)
tree3e3764f82d52f8c32b0ed9d92c13ec483dc34114 /noncore/settings/networksettings2/lancard/lancardrun.cpp
parent321f82bb3d43cbab358434fef52fe76f17e7d1e3 (diff)
downloadopie-8d2d2664e5f544b8292806e617deb7a0e4170dc0.zip
opie-8d2d2664e5f544b8292806e617deb7a0e4170dc0.tar.gz
opie-8d2d2664e5f544b8292806e617deb7a0e4170dc0.tar.bz2
Error in generation of files
Diffstat (limited to 'noncore/settings/networksettings2/lancard/lancardrun.cpp') (more/less context) (ignore 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