summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings2/nsdata.cpp
Side-by-side diff
Diffstat (limited to 'noncore/settings/networksettings2/nsdata.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/settings/networksettings2/nsdata.cpp22
1 files changed, 13 insertions, 9 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 ) {
- CfgFile.sprintf( "%s/NETCONFIG", getenv("HOME") );
+ CfgFile.sprintf( "%s/NETCONFIG",
+ NSResources->currentUser().HomeDir.latin1() );
+ fprintf( stderr, "Cfg from %s\n", CfgFile.latin1() );
@@ -355,2 +357,3 @@ QList<NodeCollection> NetworkSettingsData::collectPossible( const char * Interfa
// check if this profile handles the requested interface
+ fprintf( stderr, "check %s\n", NC->name().latin1() );
if( NC->handlesInterface( Interface ) && // if different Intf.
@@ -359,2 +362,3 @@ QList<NodeCollection> NetworkSettingsData::collectPossible( const char * Interfa
) {
+ fprintf( stderr, "Append %s\n", NC->name().latin1() );
PossibleConnections.append( NC );
@@ -372,3 +376,3 @@ QList<NodeCollection> NetworkSettingsData::collectPossible( const char * Interfa
-void NetworkSettingsData::canStart( const char * Interface ) {
+bool NetworkSettingsData::canStart( const char * Interface ) {
// load situation
@@ -379,2 +383,4 @@ void NetworkSettingsData::canStart( const char * Interface ) {
+ fprintf( stderr, "Possiblilies %d\n",
+ PossibleConnections.count() );
switch( PossibleConnections.count() ) {
@@ -386,6 +392,3 @@ void NetworkSettingsData::canStart( const char * Interface ) {
default : // need to ask user ?
- // are we connected to a server
- // system( "su %d networksettings2 --prompt %s\n",
- // "", Interface );
- break;
+ return 1;
}
@@ -412,8 +415,9 @@ void NetworkSettingsData::canStart( const char * Interface ) {
printf( "%s-c%d-allowed\n", Interface, NC->number() );
- return;
+ return 0;
}
- } else {
+ }
+
// if we come here no alternatives are possible
printf( "%s-cnn-disallowed\n", Interface );
- }
+ return 0;
}