summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings2/nsdata.cpp
authorwimpie <wimpie>2004-08-09 02:31:25 (UTC)
committer wimpie <wimpie>2004-08-09 02:31:25 (UTC)
commit0784cfdbd261c43856b45be6ab7439841e69b858 (patch) (unidiff)
treef6a27d6b2e1e6d8dcc908b2ef5836cd320ddfab1 /noncore/settings/networksettings2/nsdata.cpp
parent5e10278e748608766245ff9f59a54d1ae8ff6f7e (diff)
downloadopie-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/nsdata.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/networksettings2/nsdata.cpp25
1 files changed, 8 insertions, 17 deletions
diff --git a/noncore/settings/networksettings2/nsdata.cpp b/noncore/settings/networksettings2/nsdata.cpp
index bb37f10..3b17548 100644
--- a/noncore/settings/networksettings2/nsdata.cpp
+++ b/noncore/settings/networksettings2/nsdata.cpp
@@ -18,5 +18,5 @@ NetworkSettingsData::NetworkSettingsData( void ) {
18 CfgFile.sprintf( "%s/Settings/NS2.conf", 18 CfgFile.sprintf( "%s/Settings/NS2.conf",
19 NSResources->currentUser().HomeDir.latin1() ); 19 NSResources->currentUser().HomeDir.latin1() );
20 fprintf( stderr, "Cfg from %s\n", CfgFile.latin1() ); 20 Log(( "Cfg from %s\n", CfgFile.latin1() ));
21 21
22 // load settings 22 // load settings
@@ -80,9 +80,9 @@ void NetworkSettingsData::loadSettings( void ) {
80 // try to find netnode 80 // try to find netnode
81 NN = NSResources->findNetNode( S ); 81 NN = NSResources->findNetNode( S );
82 fprintf( stderr, "Node %s : %p\n", S.latin1(), NN ); 82 Log( ( "Node %s : %p\n", S.latin1(), NN ) );
83 } else { 83 } else {
84 // try to find instance 84 // try to find instance
85 NNI = NSResources->createNodeInstance( S ); 85 NNI = NSResources->createNodeInstance( S );
86 fprintf( stderr, "NodeInstance %s : %p\n", S.latin1(), NNI ); 86 Log( ( "NodeInstance %s : %p\n", S.latin1(), NNI ));
87 } 87 }
88 88
@@ -152,5 +152,5 @@ QString NetworkSettingsData::saveSettings( void ) {
152 QFile F( CfgFile + ".bup" ); 152 QFile F( CfgFile + ".bup" );
153 153
154 printf( "Saving settings to %s\n", CfgFile.latin1() ); 154 Log( ( "Saving settings to %s\n", CfgFile.latin1() ));
155 if( ! F.open( IO_WriteOnly | IO_Truncate ) ) { 155 if( ! F.open( IO_WriteOnly | IO_Truncate ) ) {
156 ErrS = qApp->translate( "NetworkSettings", 156 ErrS = qApp->translate( "NetworkSettings",
@@ -230,5 +230,5 @@ QString NetworkSettingsData::generateSettings( bool ForceReq ) {
230 230
231 // regenerate system files 231 // regenerate system files
232 fprintf( stderr, "Generating settings from %s\n", CfgFile.latin1() ); 232 Log( ( "Generating settings from %s\n", CfgFile.latin1() ));
233 233
234 { Name2SystemFile_t & SFM = NSResources->systemFiles(); 234 { Name2SystemFile_t & SFM = NSResources->systemFiles();
@@ -282,12 +282,4 @@ QString NetworkSettingsData::generateSettings( bool ForceReq ) {
282 } 282 }
283 283
284 // we cannot renumber with a FORCE request since
285 // we probably are NOT going to save the config
286 // e.g. when using --regen option
287 if( ! ForceReq && needToRegenerate ) {
288 NSResources->renumberConnections();
289 setModified(1);
290 }
291
292 // 284 //
293 // generate files proper to each netnodeinstance 285 // generate files proper to each netnodeinstance
@@ -322,5 +314,5 @@ QString NetworkSettingsData::generateSettings( bool ForceReq ) {
322 SF = sfit.current(); 314 SF = sfit.current();
323 315
324 fprintf( stderr, "Generating %s\n", SF->name().latin1() ); 316 Log( ( "Generating %s\n", SF->name().latin1() ));
325 SF->open(); 317 SF->open();
326 318
@@ -406,5 +398,5 @@ QList<NodeCollection> NetworkSettingsData::collectPossible( const char * Interfa
406 NC->state() != IsUp // if already used 398 NC->state() != IsUp // if already used
407 ) { 399 ) {
408 fprintf( stderr, "Append %s for %s\n", NC->name().latin1(), Interface); 400 Log( ( "Append %s for %s\n", NC->name().latin1(), Interface));
409 PossibleConnections.append( NC ); 401 PossibleConnections.append( NC );
410 } 402 }
@@ -427,6 +419,5 @@ bool NetworkSettingsData::canStart( const char * Interface ) {
427 PossibleConnections = collectPossible( Interface ); 419 PossibleConnections = collectPossible( Interface );
428 420
429 fprintf( stderr, "Possiblilies %d\n", 421 Log( ( "Possiblilies %d\n", PossibleConnections.count() ));
430 PossibleConnections.count() );
431 switch( PossibleConnections.count() ) { 422 switch( PossibleConnections.count() ) {
432 case 0 : // no connections 423 case 0 : // no connections