-rw-r--r-- | noncore/settings/networksettings2/lancard/lancardrun.cpp | 2 | ||||
-rw-r--r-- | noncore/settings/networksettings2/usb/usbrun.cpp | 2 | ||||
-rw-r--r-- | noncore/settings/networksettings2/wlan/wlanrun.cpp | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/noncore/settings/networksettings2/lancard/lancardrun.cpp b/noncore/settings/networksettings2/lancard/lancardrun.cpp index 470b797..8157dce 100644 --- a/noncore/settings/networksettings2/lancard/lancardrun.cpp +++ b/noncore/settings/networksettings2/lancard/lancardrun.cpp @@ -22,25 +22,25 @@ State_t LanCardRun::detectState( void ) { // could open file -> read interface and assign QString X; QTextStream TS(&F); X = TS.readLine(); // find interface if( handlesInterface( X ) ) { for( QDictIterator<InterfaceInfo> It(Sys.interfaces()); It.current(); ++It ) { Run = It.current(); if( X == Run->Name ) { NC->assignInterface( Run ); - return IsUp; + return (Run->IsUp) ? IsUp : Available; } } } } if( ( Run = NC->assignedInterface() ) ) { // we already have an interface assigned -> still present ? if( ! Run->IsUp ) { // usb is still free -> keep assignment return Available; } // else interface is up but NOT us -> some other profile } diff --git a/noncore/settings/networksettings2/usb/usbrun.cpp b/noncore/settings/networksettings2/usb/usbrun.cpp index de8c8a2..763644e 100644 --- a/noncore/settings/networksettings2/usb/usbrun.cpp +++ b/noncore/settings/networksettings2/usb/usbrun.cpp @@ -22,25 +22,25 @@ State_t USBRun::detectState( void ) { QString X; QTextStream TS(&F); X = TS.readLine(); Log(("%s exists\n", S.latin1() )); // find interface if( handlesInterface( X ) ) { for( QDictIterator<InterfaceInfo> It(Sys.interfaces()); It.current(); ++It ) { Run = It.current(); if( X == Run->Name ) { NC->assignInterface( Run ); - return IsUp; + return (Run->IsUp) ? IsUp : Available; } } } } Log(("Assigned %p\n", NC->assignedInterface() )); if( ( Run = NC->assignedInterface() ) ) { // we already have an interface assigned -> still present ? if( ! Run->IsUp ) { // usb is still free -> keep assignment return Available; diff --git a/noncore/settings/networksettings2/wlan/wlanrun.cpp b/noncore/settings/networksettings2/wlan/wlanrun.cpp index fe49c4e..b15a560 100644 --- a/noncore/settings/networksettings2/wlan/wlanrun.cpp +++ b/noncore/settings/networksettings2/wlan/wlanrun.cpp @@ -22,25 +22,25 @@ State_t WLanRun::detectState( void ) { // could open file -> read interface and assign QString X; QTextStream TS(&F); X = TS.readLine(); // find interface if( handlesInterface( X ) ) { for( QDictIterator<InterfaceInfo> It(Sys.interfaces()); It.current(); ++It ) { Run = It.current(); if( X == Run->Name ) { NC->assignInterface( Run ); - return IsUp; + return (Run->IsUp) ? IsUp : Available; } } } } if( ( Run = NC->assignedInterface() ) ) { // we already have an interface assigned -> still present ? if( ! Run->IsUp ) { // usb is still free -> keep assignment return Available; } // else interface is up but NOT us -> some other profile } |