author | wimpie <wimpie> | 2005-01-11 21:42:31 (UTC) |
---|---|---|
committer | wimpie <wimpie> | 2005-01-11 21:42:31 (UTC) |
commit | 96678694f8952f60d0a895cede2b621404b4bfb8 (patch) (side-by-side diff) | |
tree | 7138e554e5ba200b8f9ca8b51c89b47531dc34f2 /noncore/settings/networksettings2/gprs/GPRSrun.cpp | |
parent | f89120a7a1a3d0bf9c0805456490906ca914e560 (diff) | |
download | opie-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.cpp | 4 |
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 @@ -1,38 +1,38 @@ #include <sys/types.h> #include <signal.h> #include <errno.h> #include <qdir.h> #include <system.h> #include <resources.h> #include <netnode.h> #include "GPRSrun.h" State_t GPRSRun::detectState( void ) { // is pppd still running ? // is rfcomm still active - NodeCollection * NC = nodeCollection(); + NetworkSetup * NC = networkSetup(); InterfaceInfo * I = NC->assignedInterface(); QDir D("/var/run"); if( I ) { // has some pppx attached return ( I->IsUp ) ? IsUp : Available; } // check ppp itself and figure out interface odebug << "Check for ppp " << NC->name() << oendl; if( D.exists( QString("ppp-")+removeSpaces(NC->name())+".pid") ) { // get pid and check if pppd is still running QFile F( D.path()+"/ppp-"+removeSpaces(NC->name())+".pid"); odebug << "PPP PID " << F.name() << oendl; if( F.open( IO_ReadOnly ) ) { QTextStream TS(&F); QString X = TS.readLine(); PPPPid = X.toULong(); int rv; rv = ::kill( PPPPid, 0 ); @@ -41,49 +41,49 @@ State_t GPRSRun::detectState( void ) { ) { // pppd is still up X = TS.readLine(); I = NSResources->system().findInterface(X); odebug << "ppp running : IFace " << X << " = " << (long)I << oendl; if( I ) { NC->assignInterface( I ); return (I->IsUp) ? IsUp : Available; } return Available; } else { // pppd is down PPPPid = 0; } } // else pppd is down } NC->assignInterface( 0 ); return Unknown; } -QString GPRSRun::setMyState( NodeCollection * NC, Action_t A , bool ) { +QString GPRSRun::setMyState( NetworkSetup * NC, Action_t A , bool ) { if( A == Up ) { // start ppp on deviceFile QStringList SL; SL << "pon" << removeSpaces( NC->name() ) << NC->device()->deviceFile(); if( ! NSResources->system().execAsUser( SL ) ) { return QString("Cannot start pppd for %1").arg(NC->name()); } } else if ( A == Down ) { if( PPPPid == 0 ) { detectState(); } if( PPPPid ) { QStringList SL; SL << "poff" << removeSpaces( NC->name() ); if( ! NSResources->system().execAsUser( SL ) ) { return QString("Cannot terminate pppd for %1").arg(NC->name()); } |