-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 ) { | |||
22 | // could open file -> read interface and assign | 22 | // could open file -> read interface and assign |
23 | QString X; | 23 | QString X; |
24 | QTextStream TS(&F); | 24 | QTextStream TS(&F); |
25 | X = TS.readLine(); | 25 | X = TS.readLine(); |
26 | // find interface | 26 | // find interface |
27 | if( handlesInterface( X ) ) { | 27 | if( handlesInterface( X ) ) { |
28 | for( QDictIterator<InterfaceInfo> It(Sys.interfaces()); | 28 | for( QDictIterator<InterfaceInfo> It(Sys.interfaces()); |
29 | It.current(); | 29 | It.current(); |
30 | ++It ) { | 30 | ++It ) { |
31 | Run = It.current(); | 31 | Run = It.current(); |
32 | if( X == Run->Name ) { | 32 | if( X == Run->Name ) { |
33 | NC->assignInterface( Run ); | 33 | NC->assignInterface( Run ); |
34 | return IsUp; | 34 | return (Run->IsUp) ? IsUp : Available; |
35 | } | 35 | } |
36 | } | 36 | } |
37 | } | 37 | } |
38 | } | 38 | } |
39 | 39 | ||
40 | if( ( Run = NC->assignedInterface() ) ) { | 40 | if( ( Run = NC->assignedInterface() ) ) { |
41 | // we already have an interface assigned -> still present ? | 41 | // we already have an interface assigned -> still present ? |
42 | if( ! Run->IsUp ) { | 42 | if( ! Run->IsUp ) { |
43 | // usb is still free -> keep assignment | 43 | // usb is still free -> keep assignment |
44 | return Available; | 44 | return Available; |
45 | } // else interface is up but NOT us -> some other profile | 45 | } // else interface is up but NOT us -> some other profile |
46 | } | 46 | } |
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 ) { | |||
22 | QString X; | 22 | QString X; |
23 | QTextStream TS(&F); | 23 | QTextStream TS(&F); |
24 | X = TS.readLine(); | 24 | X = TS.readLine(); |
25 | Log(("%s exists\n", S.latin1() )); | 25 | Log(("%s exists\n", S.latin1() )); |
26 | // find interface | 26 | // find interface |
27 | if( handlesInterface( X ) ) { | 27 | if( handlesInterface( X ) ) { |
28 | for( QDictIterator<InterfaceInfo> It(Sys.interfaces()); | 28 | for( QDictIterator<InterfaceInfo> It(Sys.interfaces()); |
29 | It.current(); | 29 | It.current(); |
30 | ++It ) { | 30 | ++It ) { |
31 | Run = It.current(); | 31 | Run = It.current(); |
32 | if( X == Run->Name ) { | 32 | if( X == Run->Name ) { |
33 | NC->assignInterface( Run ); | 33 | NC->assignInterface( Run ); |
34 | return IsUp; | 34 | return (Run->IsUp) ? IsUp : Available; |
35 | } | 35 | } |
36 | } | 36 | } |
37 | } | 37 | } |
38 | } | 38 | } |
39 | 39 | ||
40 | Log(("Assigned %p\n", NC->assignedInterface() )); | 40 | Log(("Assigned %p\n", NC->assignedInterface() )); |
41 | 41 | ||
42 | if( ( Run = NC->assignedInterface() ) ) { | 42 | if( ( Run = NC->assignedInterface() ) ) { |
43 | // we already have an interface assigned -> still present ? | 43 | // we already have an interface assigned -> still present ? |
44 | if( ! Run->IsUp ) { | 44 | if( ! Run->IsUp ) { |
45 | // usb is still free -> keep assignment | 45 | // usb is still free -> keep assignment |
46 | return Available; | 46 | 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 ) { | |||
22 | // could open file -> read interface and assign | 22 | // could open file -> read interface and assign |
23 | QString X; | 23 | QString X; |
24 | QTextStream TS(&F); | 24 | QTextStream TS(&F); |
25 | X = TS.readLine(); | 25 | X = TS.readLine(); |
26 | // find interface | 26 | // find interface |
27 | if( handlesInterface( X ) ) { | 27 | if( handlesInterface( X ) ) { |
28 | for( QDictIterator<InterfaceInfo> It(Sys.interfaces()); | 28 | for( QDictIterator<InterfaceInfo> It(Sys.interfaces()); |
29 | It.current(); | 29 | It.current(); |
30 | ++It ) { | 30 | ++It ) { |
31 | Run = It.current(); | 31 | Run = It.current(); |
32 | if( X == Run->Name ) { | 32 | if( X == Run->Name ) { |
33 | NC->assignInterface( Run ); | 33 | NC->assignInterface( Run ); |
34 | return IsUp; | 34 | return (Run->IsUp) ? IsUp : Available; |
35 | } | 35 | } |
36 | } | 36 | } |
37 | } | 37 | } |
38 | } | 38 | } |
39 | 39 | ||
40 | if( ( Run = NC->assignedInterface() ) ) { | 40 | if( ( Run = NC->assignedInterface() ) ) { |
41 | // we already have an interface assigned -> still present ? | 41 | // we already have an interface assigned -> still present ? |
42 | if( ! Run->IsUp ) { | 42 | if( ! Run->IsUp ) { |
43 | // usb is still free -> keep assignment | 43 | // usb is still free -> keep assignment |
44 | return Available; | 44 | return Available; |
45 | } // else interface is up but NOT us -> some other profile | 45 | } // else interface is up but NOT us -> some other profile |
46 | } | 46 | } |