summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings2/usb/usbrun.cpp
Unidiff
Diffstat (limited to 'noncore/settings/networksettings2/usb/usbrun.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/networksettings2/usb/usbrun.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/noncore/settings/networksettings2/usb/usbrun.cpp b/noncore/settings/networksettings2/usb/usbrun.cpp
index beacd7b..b8ac8a8 100644
--- a/noncore/settings/networksettings2/usb/usbrun.cpp
+++ b/noncore/settings/networksettings2/usb/usbrun.cpp
@@ -13,4 +13,5 @@ void USBRun::detectState( NodeCollection * NC ) {
13 InterfaceInfo * Run; 13 InterfaceInfo * Run;
14 QFile F( S ); 14 QFile F( S );
15 Log(("Detecting for %s\n", NC->name().latin1() ));
15 16
16 if( F.open( IO_ReadOnly ) ) { 17 if( F.open( IO_ReadOnly ) ) {
@@ -19,4 +20,5 @@ void USBRun::detectState( NodeCollection * NC ) {
19 QTextStream TS(&F); 20 QTextStream TS(&F);
20 X = TS.readLine(); 21 X = TS.readLine();
22 Log(("%s exists\n", S.latin1() ));
21 // find interface 23 // find interface
22 if( handlesInterface( X ) ) { 24 if( handlesInterface( X ) ) {
@@ -35,5 +37,5 @@ void USBRun::detectState( NodeCollection * NC ) {
35 } 37 }
36 38
37 fprintf( stderr, "Assigned %p\n", assignedInterface() ); 39 Log(("Assigned %p\n", assignedInterface() ));
38 if( ( Run = assignedInterface() ) ) { 40 if( ( Run = assignedInterface() ) ) {
39 // we already have an interface assigned -> still present ? 41 // we already have an interface assigned -> still present ?
@@ -54,9 +56,9 @@ void USBRun::detectState( NodeCollection * NC ) {
54 Run = It.current(); 56 Run = It.current();
55 57
56 fprintf( stderr, "%s %d %d=%d %d\n", 58 Log(("%s %d %d=%d %d\n",
57 Run->Name.latin1(), 59 Run->Name.latin1(),
58 handlesInterface( Run->Name ), 60 handlesInterface( Run->Name ),
59 Run->CardType, ARPHRD_ETHER, 61 Run->CardType, ARPHRD_ETHER,
60 ! Run->IsUp ); 62 ! Run->IsUp ));
61 63
62 if( handlesInterface( Run->Name ) && 64 if( handlesInterface( Run->Name ) &&
@@ -64,5 +66,5 @@ void USBRun::detectState( NodeCollection * NC ) {
64 ! Run->IsUp 66 ! Run->IsUp
65 ) { 67 ) {
66 fprintf( stderr, "Released(OFF)\n" ); 68 Log(("Released(OFF)\n" ));
67 // proper type, and Not UP -> free 69 // proper type, and Not UP -> free
68 NC->setCurrentState( Off ); 70 NC->setCurrentState( Off );
@@ -71,5 +73,5 @@ void USBRun::detectState( NodeCollection * NC ) {
71 } 73 }
72 // no free found 74 // no free found
73 fprintf( stderr, "UNA\n" ); 75 Log(("UNA\n" ));
74 76
75 NC->setCurrentState( Unavailable ); 77 NC->setCurrentState( Unavailable );
@@ -95,5 +97,5 @@ bool USBRun::setState( NodeCollection * NC, Action_t A, bool ) {
95 N->assignNode( netNode() ); 97 N->assignNode( netNode() );
96 assignInterface( N ); 98 assignInterface( N );
97 fprintf( stderr, "Assing %p\n", N ); 99 Log(("Assing %p\n", N ));
98 NC->setCurrentState( Available ); 100 NC->setCurrentState( Available );
99 return 1; 101 return 1;