summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings2/ppp/ppprun.cpp
Unidiff
Diffstat (limited to 'noncore/settings/networksettings2/ppp/ppprun.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/networksettings2/ppp/ppprun.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/noncore/settings/networksettings2/ppp/ppprun.cpp b/noncore/settings/networksettings2/ppp/ppprun.cpp
index 8403e6d..f548483 100644
--- a/noncore/settings/networksettings2/ppp/ppprun.cpp
+++ b/noncore/settings/networksettings2/ppp/ppprun.cpp
@@ -4,46 +4,46 @@
4PPPRun::PPPRun( ANetNodeInstance * NNI, PPPData & Data ) : 4PPPRun::PPPRun( ANetNodeInstance * NNI, PPPData & Data ) :
5 RuntimeInfo( NNI ), Pat( "eth[0-9]" ) { 5 RuntimeInfo( NNI ), Pat( "eth[0-9]" ) {
6 D = &Data; 6 D = &Data;
7} 7}
8 8
9State_t PPPRun::detectState( void ) { 9State_t PPPRun::detectState( void ) {
10 if( isMyPPPDRunning( ) ) { 10 if( isMyPPPDRunning( ) ) {
11 return ( isMyPPPUp() ) ? IsUp : Available; 11 return ( isMyPPPUp() ) ? IsUp : Available;
12 } 12 }
13 return Off; 13 return Off;
14} 14}
15 15
16QString PPPRun::setMyState( NodeCollection * NC, Action_t A, bool ) { 16QString PPPRun::setMyState( NetworkSetup * , Action_t , bool ) {
17 return QString(); 17 return QString();
18} 18}
19 19
20bool PPPRun::isMyPPPDRunning( void ) { 20bool PPPRun::isMyPPPDRunning( void ) {
21 return 0; 21 return 0;
22} 22}
23 23
24bool PPPRun::isMyPPPUp( void ) { 24bool PPPRun::isMyPPPUp( void ) {
25 System & S = NSResources->system(); 25 System & S = NSResources->system();
26 InterfaceInfo * Run; 26 InterfaceInfo * Run;
27 QRegExp R( "ppp[0-9]" ); 27 QRegExp R( "ppp[0-9]" );
28 28
29 for( QDictIterator<InterfaceInfo> It(S.interfaces()); 29 for( QDictIterator<InterfaceInfo> It(S.interfaces());
30 It.current(); 30 It.current();
31 ++It ) { 31 ++It ) {
32 Run = It.current(); 32 Run = It.current();
33 if( R.match( Run->Name ) >= 0 && 33 if( R.match( Run->Name ) >= 0 &&
34 Run->IsPointToPoint 34 Run->IsPointToPoint
35 ) { 35 ) {
36 // this is a LAN card 36 // this is a LAN card
37 if( Run->assignedConnection() == netNode()->connection() ) { 37 if( Run->assignedToNetworkSetup() == netNode()->networkSetup() ) {
38 // assigned to us 38 // assigned to us
39 return 1; 39 return 1;
40 } 40 }
41 } 41 }
42 } 42 }
43 return 0; 43 return 0;
44} 44}
45 45
46bool PPPRun::handlesInterface( const QString & S ) { 46bool PPPRun::handlesInterface( const QString & S ) {
47 return Pat.match( S ) >= 0; 47 return Pat.match( S ) >= 0;
48} 48}
49 49