summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings2/nsdata.cpp
Unidiff
Diffstat (limited to 'noncore/settings/networksettings2/nsdata.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/networksettings2/nsdata.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/noncore/settings/networksettings2/nsdata.cpp b/noncore/settings/networksettings2/nsdata.cpp
index d709c0a..e2dd5b5 100644
--- a/noncore/settings/networksettings2/nsdata.cpp
+++ b/noncore/settings/networksettings2/nsdata.cpp
@@ -12,12 +12,19 @@
12static QString CfgFile; 12static QString CfgFile;
13 13
14NetworkSettingsData::NetworkSettingsData( void ) { 14NetworkSettingsData::NetworkSettingsData( void ) {
15 // init global resources structure 15 // init global resources structure
16 new TheNSResources(); 16 new TheNSResources();
17 17
18 if( ! NSResources->userKnown() ) {
19 Log(( "Cannot detect qpe user HOME=\"%s\" USER=\"%s\"\n",
20 NSResources->currentUser().HomeDir.latin1(),
21 NSResources->currentUser().UserName.latin1() ));
22 return;
23 }
24
18 CfgFile.sprintf( "%s/Settings/NS2.conf", 25 CfgFile.sprintf( "%s/Settings/NS2.conf",
19 NSResources->currentUser().HomeDir.latin1() ); 26 NSResources->currentUser().HomeDir.latin1() );
20 Log(( "Cfg from %s\n", CfgFile.latin1() )); 27 Log(( "Cfg from %s\n", CfgFile.latin1() ));
21 28
22 // load settings 29 // load settings
23 IsModified = 0; 30 IsModified = 0;
@@ -536,13 +543,14 @@ bool NetworkSettingsData::canStart( const char * Interface ) {
536 // load situation 543 // load situation
537 NodeCollection * NC = 0; 544 NodeCollection * NC = 0;
538 QList<NodeCollection> PossibleConnections; 545 QList<NodeCollection> PossibleConnections;
539 546
540 PossibleConnections = collectPossible( Interface ); 547 PossibleConnections = collectPossible( Interface );
541 548
542 Log( ( "Possiblilies %d\n", PossibleConnections.count() )); 549 Log( ( "for %s : Possiblilies %d\n",
550 Interface, PossibleConnections.count() ));
543 switch( PossibleConnections.count() ) { 551 switch( PossibleConnections.count() ) {
544 case 0 : // no connections 552 case 0 : // no connections
545 break; 553 break;
546 case 1 : // one connection 554 case 1 : // one connection
547 NC = PossibleConnections.first(); 555 NC = PossibleConnections.first();
548 break; 556 break;
@@ -566,18 +574,20 @@ bool NetworkSettingsData::canStart( const char * Interface ) {
566 break; 574 break;
567 } 575 }
568 // FT 576 // FT
569 case Available : 577 case Available :
570 case IsUp : // also called for 'ifdown' 578 case IsUp : // also called for 'ifdown'
571 // device is ready -> done 579 // device is ready -> done
580 Log(( "%s-c%d-allowed\n", Interface, NC->number() ));
572 printf( "%s-c%d-allowed\n", Interface, NC->number() ); 581 printf( "%s-c%d-allowed\n", Interface, NC->number() );
573 return 0; 582 return 0;
574 } 583 }
575 } 584 }
576 585
577 // if we come here no alternatives are possible 586 // if we come here no alternatives are possible
587 Log(( "%s-cnn-disallowed\n", Interface ));
578 printf( "%s-cnn-disallowed\n", Interface ); 588 printf( "%s-cnn-disallowed\n", Interface );
579 return 0; 589 return 0;
580} 590}
581 591
582/* 592/*
583 Called by the system to regenerate config files 593 Called by the system to regenerate config files