Diffstat (limited to 'noncore/settings/networksettings2/nsdata.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/networksettings2/nsdata.cpp | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/noncore/settings/networksettings2/nsdata.cpp b/noncore/settings/networksettings2/nsdata.cpp index eb63e02..b4d9aaa 100644 --- a/noncore/settings/networksettings2/nsdata.cpp +++ b/noncore/settings/networksettings2/nsdata.cpp | |||
@@ -17,3 +17,5 @@ NetworkSettingsData::NetworkSettingsData( void ) { | |||
17 | 17 | ||
18 | CfgFile.sprintf( "%s/NETCONFIG", getenv("HOME") ); | 18 | CfgFile.sprintf( "%s/NETCONFIG", |
19 | NSResources->currentUser().HomeDir.latin1() ); | ||
20 | fprintf( stderr, "Cfg from %s\n", CfgFile.latin1() ); | ||
19 | 21 | ||
@@ -355,2 +357,3 @@ QList<NodeCollection> NetworkSettingsData::collectPossible( const char * Interfa | |||
355 | // check if this profile handles the requested interface | 357 | // check if this profile handles the requested interface |
358 | fprintf( stderr, "check %s\n", NC->name().latin1() ); | ||
356 | if( NC->handlesInterface( Interface ) && // if different Intf. | 359 | if( NC->handlesInterface( Interface ) && // if different Intf. |
@@ -359,2 +362,3 @@ QList<NodeCollection> NetworkSettingsData::collectPossible( const char * Interfa | |||
359 | ) { | 362 | ) { |
363 | fprintf( stderr, "Append %s\n", NC->name().latin1() ); | ||
360 | PossibleConnections.append( NC ); | 364 | PossibleConnections.append( NC ); |
@@ -372,3 +376,3 @@ QList<NodeCollection> NetworkSettingsData::collectPossible( const char * Interfa | |||
372 | 376 | ||
373 | void NetworkSettingsData::canStart( const char * Interface ) { | 377 | bool NetworkSettingsData::canStart( const char * Interface ) { |
374 | // load situation | 378 | // load situation |
@@ -379,2 +383,4 @@ void NetworkSettingsData::canStart( const char * Interface ) { | |||
379 | 383 | ||
384 | fprintf( stderr, "Possiblilies %d\n", | ||
385 | PossibleConnections.count() ); | ||
380 | switch( PossibleConnections.count() ) { | 386 | switch( PossibleConnections.count() ) { |
@@ -386,6 +392,3 @@ void NetworkSettingsData::canStart( const char * Interface ) { | |||
386 | default : // need to ask user ? | 392 | default : // need to ask user ? |
387 | // are we connected to a server | 393 | return 1; |
388 | // system( "su %d networksettings2 --prompt %s\n", | ||
389 | // "", Interface ); | ||
390 | break; | ||
391 | } | 394 | } |
@@ -412,8 +415,9 @@ void NetworkSettingsData::canStart( const char * Interface ) { | |||
412 | printf( "%s-c%d-allowed\n", Interface, NC->number() ); | 415 | printf( "%s-c%d-allowed\n", Interface, NC->number() ); |
413 | return; | 416 | return 0; |
414 | } | 417 | } |
415 | } else { | 418 | } |
416 | // if we come here no alternatives are possible | 419 | |
417 | printf( "%s-cnn-disallowed\n", Interface ); | 420 | // if we come here no alternatives are possible |
418 | } | 421 | printf( "%s-cnn-disallowed\n", Interface ); |
422 | return 0; | ||
419 | } | 423 | } |