summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings2/gprs/GPRSrun.cpp
authorwimpie <wimpie>2005-01-11 21:42:31 (UTC)
committer wimpie <wimpie>2005-01-11 21:42:31 (UTC)
commit96678694f8952f60d0a895cede2b621404b4bfb8 (patch) (unidiff)
tree7138e554e5ba200b8f9ca8b51c89b47531dc34f2 /noncore/settings/networksettings2/gprs/GPRSrun.cpp
parentf89120a7a1a3d0bf9c0805456490906ca914e560 (diff)
downloadopie-96678694f8952f60d0a895cede2b621404b4bfb8.zip
opie-96678694f8952f60d0a895cede2b621404b4bfb8.tar.gz
opie-96678694f8952f60d0a895cede2b621404b4bfb8.tar.bz2
Major rename of NodeCollection to NetworkSetup
this commit is broken (missing symbols)
Diffstat (limited to 'noncore/settings/networksettings2/gprs/GPRSrun.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/settings/networksettings2/gprs/GPRSrun.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/noncore/settings/networksettings2/gprs/GPRSrun.cpp b/noncore/settings/networksettings2/gprs/GPRSrun.cpp
index cccc71a..fd61f3a 100644
--- a/noncore/settings/networksettings2/gprs/GPRSrun.cpp
+++ b/noncore/settings/networksettings2/gprs/GPRSrun.cpp
@@ -2,25 +2,25 @@
2#include <signal.h> 2#include <signal.h>
3#include <errno.h> 3#include <errno.h>
4#include <qdir.h> 4#include <qdir.h>
5#include <system.h> 5#include <system.h>
6#include <resources.h> 6#include <resources.h>
7#include <netnode.h> 7#include <netnode.h>
8#include "GPRSrun.h" 8#include "GPRSrun.h"
9 9
10State_t GPRSRun::detectState( void ) { 10State_t GPRSRun::detectState( void ) {
11 11
12 // is pppd still running ? 12 // is pppd still running ?
13 // is rfcomm still active 13 // is rfcomm still active
14 NodeCollection * NC = nodeCollection(); 14 NetworkSetup * NC = networkSetup();
15 InterfaceInfo * I = NC->assignedInterface(); 15 InterfaceInfo * I = NC->assignedInterface();
16 16
17 QDir D("/var/run"); 17 QDir D("/var/run");
18 18
19 if( I ) { 19 if( I ) {
20 // has some pppx attached 20 // has some pppx attached
21 return ( I->IsUp ) ? IsUp : Available; 21 return ( I->IsUp ) ? IsUp : Available;
22 } 22 }
23 23
24 // check ppp itself and figure out interface 24 // check ppp itself and figure out interface
25 25
26 odebug << "Check for ppp " << NC->name() << oendl; 26 odebug << "Check for ppp " << NC->name() << oendl;
@@ -53,25 +53,25 @@ State_t GPRSRun::detectState( void ) {
53 return Available; 53 return Available;
54 54
55 } else { 55 } else {
56 // pppd is down 56 // pppd is down
57 PPPPid = 0; 57 PPPPid = 0;
58 } 58 }
59 } // else pppd is down 59 } // else pppd is down
60 } 60 }
61 NC->assignInterface( 0 ); 61 NC->assignInterface( 0 );
62 return Unknown; 62 return Unknown;
63} 63}
64 64
65QString GPRSRun::setMyState( NodeCollection * NC, Action_t A , bool ) { 65QString GPRSRun::setMyState( NetworkSetup * NC, Action_t A , bool ) {
66 66
67 if( A == Up ) { 67 if( A == Up ) {
68 // start ppp on deviceFile 68 // start ppp on deviceFile
69 QStringList SL; 69 QStringList SL;
70 SL << "pon" 70 SL << "pon"
71 << removeSpaces( NC->name() ) 71 << removeSpaces( NC->name() )
72 << NC->device()->deviceFile(); 72 << NC->device()->deviceFile();
73 73
74 if( ! NSResources->system().execAsUser( SL ) ) { 74 if( ! NSResources->system().execAsUser( SL ) ) {
75 return QString("Cannot start pppd for %1").arg(NC->name()); 75 return QString("Cannot start pppd for %1").arg(NC->name());
76 } 76 }
77 } else if ( A == Down ) { 77 } else if ( A == Down ) {