author | wimpie <wimpie> | 2004-04-04 11:42:05 (UTC) |
---|---|---|
committer | wimpie <wimpie> | 2004-04-04 11:42:05 (UTC) |
commit | 8d2d2664e5f544b8292806e617deb7a0e4170dc0 (patch) (unidiff) | |
tree | 3e3764f82d52f8c32b0ed9d92c13ec483dc34114 /noncore/settings/networksettings2/lancard/lancardrun.cpp | |
parent | 321f82bb3d43cbab358434fef52fe76f17e7d1e3 (diff) | |
download | opie-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) (show whitespace changes)
-rw-r--r-- | noncore/settings/networksettings2/lancard/lancardrun.cpp | 14 |
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 | |||
@@ -33,13 +33,22 @@ void LanCardRun::detectState( NodeCollection * NC ) { | |||
33 | return; | 33 | return; |
34 | } | 34 | } |
35 | } | 35 | } |
36 | } | 36 | } |
37 | } | 37 | } |
38 | 38 | ||
39 | // we are certainly not UP | 39 | if( ( Run = assignedInterface() ) ) { |
40 | // we already have an interface assigned -> still present ? | ||
41 | if( ! Run->IsUp ) { | ||
42 | // usb is still free -> keep assignment | ||
43 | NC->setCurrentState( Available ); | ||
44 | return; | ||
45 | } // else interface is up but NOT us -> some other profile | ||
46 | } | ||
47 | |||
48 | // nothing (valid) assigned to us | ||
40 | assignInterface( 0 ); | 49 | assignInterface( 0 ); |
41 | 50 | ||
42 | // find possible interface | 51 | // find possible interface |
43 | for( QDictIterator<InterfaceInfo> It(Sys.interfaces()); | 52 | for( QDictIterator<InterfaceInfo> It(Sys.interfaces()); |
44 | It.current(); | 53 | It.current(); |
45 | ++It ) { | 54 | ++It ) { |
@@ -84,14 +93,13 @@ bool LanCardRun::setState( NodeCollection * NC, Action_t A ) { | |||
84 | case Deactivate : | 93 | case Deactivate : |
85 | if( NC->currentState() == IsUp ) { | 94 | if( NC->currentState() == IsUp ) { |
86 | // bring down first | 95 | // bring down first |
87 | if( ! connection()->setState( Down ) ) | 96 | if( ! connection()->setState( Down ) ) |
88 | // could not ... | 97 | // could not ... |
89 | return 0; | 98 | return 0; |
90 | } | 99 | } else if( NC->currentState() != Available ) { |
91 | if( NC->currentState() != Available ) { | ||
92 | return 1; | 100 | return 1; |
93 | } | 101 | } |
94 | assignedInterface()->assignNode( 0 ); // release | 102 | assignedInterface()->assignNode( 0 ); // release |
95 | assignInterface( 0 ); | 103 | assignInterface( 0 ); |
96 | NC->setCurrentState( Off ); | 104 | NC->setCurrentState( Off ); |
97 | return 1; | 105 | return 1; |