author | wimpie <wimpie> | 2004-08-09 02:31:25 (UTC) |
---|---|---|
committer | wimpie <wimpie> | 2004-08-09 02:31:25 (UTC) |
commit | 0784cfdbd261c43856b45be6ab7439841e69b858 (patch) (side-by-side diff) | |
tree | f6a27d6b2e1e6d8dcc908b2ef5836cd320ddfab1 /noncore/settings/networksettings2/usb | |
parent | 5e10278e748608766245ff9f59a54d1ae8ff6f7e (diff) | |
download | opie-0784cfdbd261c43856b45be6ab7439841e69b858.zip opie-0784cfdbd261c43856b45be6ab7439841e69b858.tar.gz opie-0784cfdbd261c43856b45be6ab7439841e69b858.tar.bz2 |
Many changes :
bluetooth and usb seems to work
added preliminary support for VPN on top of any network
This version is still very much crippled yet is does DO some
things
Diffstat (limited to 'noncore/settings/networksettings2/usb') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/networksettings2/usb/usbrun.cpp | 14 |
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 @@ -11,14 +11,16 @@ void USBRun::detectState( NodeCollection * NC ) { QString S = QString( "/tmp/profile-%1.up" ).arg(NC->number()); System & Sys = NSResources->system(); InterfaceInfo * Run; QFile F( S ); + Log(("Detecting for %s\n", NC->name().latin1() )); if( F.open( IO_ReadOnly ) ) { // could open file -> read interface and assign QString X; QTextStream TS(&F); X = TS.readLine(); + Log(("%s exists\n", S.latin1() )); // find interface if( handlesInterface( X ) ) { for( QDictIterator<InterfaceInfo> It(Sys.interfaces()); It.current(); @@ -33,9 +35,9 @@ void USBRun::detectState( NodeCollection * NC ) { } } } - fprintf( stderr, "Assigned %p\n", assignedInterface() ); + Log(("Assigned %p\n", assignedInterface() )); if( ( Run = assignedInterface() ) ) { // we already have an interface assigned -> still present ? if( ! Run->IsUp ) { // usb is still free -> keep assignment @@ -52,26 +54,26 @@ void USBRun::detectState( NodeCollection * NC ) { It.current(); ++It ) { Run = It.current(); - fprintf( stderr, "%s %d %d=%d %d\n", + Log(("%s %d %d=%d %d\n", Run->Name.latin1(), handlesInterface( Run->Name ), Run->CardType, ARPHRD_ETHER, - ! Run->IsUp ); + ! Run->IsUp )); if( handlesInterface( Run->Name ) && Run->CardType == ARPHRD_ETHER && ! Run->IsUp ) { - fprintf( stderr, "Released(OFF)\n" ); + Log(("Released(OFF)\n" )); // proper type, and Not UP -> free NC->setCurrentState( Off ); return; } } // no free found - fprintf( stderr, "UNA\n" ); + Log(("UNA\n" )); NC->setCurrentState( Unavailable ); } @@ -93,9 +95,9 @@ bool USBRun::setState( NodeCollection * NC, Action_t A, bool ) { // because we were OFF the interface // we get back is NOT assigned N->assignNode( netNode() ); assignInterface( N ); - fprintf( stderr, "Assing %p\n", N ); + Log(("Assing %p\n", N )); NC->setCurrentState( Available ); return 1; } case Deactivate : |