Diffstat (limited to 'noncore/settings/networksettings2/usb/usbrun.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/networksettings2/usb/usbrun.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/noncore/settings/networksettings2/usb/usbrun.cpp b/noncore/settings/networksettings2/usb/usbrun.cpp index 763644e..4082f7f 100644 --- a/noncore/settings/networksettings2/usb/usbrun.cpp +++ b/noncore/settings/networksettings2/usb/usbrun.cpp | |||
@@ -7,13 +7,13 @@ | |||
7 | State_t USBRun::detectState( void ) { | 7 | State_t USBRun::detectState( void ) { |
8 | 8 | ||
9 | // unavailable : no card found | 9 | // unavailable : no card found |
10 | // available : card found and assigned to us or free | 10 | // available : card found and assigned to us or free |
11 | // up : card found and assigned to us and up | 11 | // up : card found and assigned to us and up |
12 | 12 | ||
13 | NodeCollection * NC = nodeCollection(); | 13 | NetworkSetup * NC = networkSetup(); |
14 | QString S = QString( "/tmp/profile-%1.up" ).arg(NC->number()); | 14 | QString S = QString( "/tmp/profile-%1.up" ).arg(NC->number()); |
15 | System & Sys = NSResources->system(); | 15 | System & Sys = NSResources->system(); |
16 | InterfaceInfo * Run; | 16 | InterfaceInfo * Run; |
17 | QFile F( S ); | 17 | QFile F( S ); |
18 | Log(("Detecting for %s\n", NC->name().latin1() )); | 18 | Log(("Detecting for %s\n", NC->name().latin1() )); |
19 | 19 | ||
@@ -58,13 +58,13 @@ State_t USBRun::detectState( void ) { | |||
58 | return Available; | 58 | return Available; |
59 | } | 59 | } |
60 | 60 | ||
61 | return Unavailable; | 61 | return Unavailable; |
62 | } | 62 | } |
63 | 63 | ||
64 | QString USBRun::setMyState( NodeCollection * NC, Action_t A, bool ) { | 64 | QString USBRun::setMyState( NetworkSetup * NC, Action_t, bool ) { |
65 | 65 | ||
66 | InterfaceInfo * I = getInterface(); | 66 | InterfaceInfo * I = getInterface(); |
67 | 67 | ||
68 | if( ! I ) { | 68 | if( ! I ) { |
69 | return QString("No usb device available"); | 69 | return QString("No usb device available"); |
70 | } | 70 | } |
@@ -94,17 +94,17 @@ InterfaceInfo * USBRun::getInterface( void ) { | |||
94 | ! Run->IsUp )); | 94 | ! Run->IsUp )); |
95 | 95 | ||
96 | if( handlesInterface( Run->Name ) && | 96 | if( handlesInterface( Run->Name ) && |
97 | Run->CardType == ARPHRD_ETHER | 97 | Run->CardType == ARPHRD_ETHER |
98 | ) { | 98 | ) { |
99 | // this is a USB card | 99 | // this is a USB card |
100 | if( Run->assignedConnection() == netNode()->connection() ) { | 100 | if( Run->assignedToNetworkSetup() == netNode()->networkSetup() ) { |
101 | // assigned to us | 101 | // assigned to us |
102 | return Run; | 102 | return Run; |
103 | } else if( ! Run->IsUp && | 103 | } else if( ! Run->IsUp && |
104 | Run->assignedConnection() == 0 ) { | 104 | Run->assignedToNetworkSetup() == 0 ) { |
105 | // free | 105 | // free |
106 | best = Run; | 106 | best = Run; |
107 | } // UP or not assigned to us | 107 | } // UP or not assigned to us |
108 | } | 108 | } |
109 | } | 109 | } |
110 | return best; // can be 0 | 110 | return best; // can be 0 |