summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings2/usb/usbrun.cpp
Unidiff
Diffstat (limited to 'noncore/settings/networksettings2/usb/usbrun.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/settings/networksettings2/usb/usbrun.cpp21
1 files changed, 16 insertions, 5 deletions
diff --git a/noncore/settings/networksettings2/usb/usbrun.cpp b/noncore/settings/networksettings2/usb/usbrun.cpp
index 49b5a77..3007e79 100644
--- a/noncore/settings/networksettings2/usb/usbrun.cpp
+++ b/noncore/settings/networksettings2/usb/usbrun.cpp
@@ -36,4 +36,13 @@ void USBRun::detectState( NodeCollection * NC ) {
36 36
37 fprintf( stderr, "NUP\n" ); 37 fprintf( stderr, "Assigned %p\n", assignedInterface() );
38 // definitively not up 38 if( ( Run = assignedInterface() ) ) {
39 // we already have an interface assigned -> still present ?
40 if( ! Run->IsUp ) {
41 // usb is still free -> keep assignment
42 NC->setCurrentState( Available );
43 return;
44 } // else interface is up but NOT us -> some other profile
45 }
46
47 // nothing (valid) assigned to us
39 assignInterface( 0 ); 48 assignInterface( 0 );
@@ -45,2 +54,3 @@ void USBRun::detectState( NodeCollection * NC ) {
45 Run = It.current(); 54 Run = It.current();
55
46 fprintf( stderr, "%s %d %d=%d %d\n", 56 fprintf( stderr, "%s %d %d=%d %d\n",
@@ -50,2 +60,3 @@ void USBRun::detectState( NodeCollection * NC ) {
50 ! Run->IsUp ); 60 ! Run->IsUp );
61
51 if( handlesInterface( Run->Name ) && 62 if( handlesInterface( Run->Name ) &&
@@ -54,3 +65,3 @@ void USBRun::detectState( NodeCollection * NC ) {
54 ) { 65 ) {
55 fprintf( stderr, "OFF\n" ); 66 fprintf( stderr, "Released(OFF)\n" );
56 // proper type, and Not UP -> free 67 // proper type, and Not UP -> free
@@ -85,2 +96,3 @@ bool USBRun::setState( NodeCollection * NC, Action_t A ) {
85 assignInterface( N ); 96 assignInterface( N );
97 fprintf( stderr, "Assing %p\n", N );
86 NC->setCurrentState( Available ); 98 NC->setCurrentState( Available );
@@ -94,4 +106,3 @@ bool USBRun::setState( NodeCollection * NC, Action_t A ) {
94 return 0; 106 return 0;
95 } 107 } else if( NC->currentState() != Available ) {
96 if( NC->currentState() != Available ) {
97 return 1; 108 return 1;