summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings2/ppp/ppp_NNI.cpp
Unidiff
Diffstat (limited to 'noncore/settings/networksettings2/ppp/ppp_NNI.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/networksettings2/ppp/ppp_NNI.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/noncore/settings/networksettings2/ppp/ppp_NNI.cpp b/noncore/settings/networksettings2/ppp/ppp_NNI.cpp
index 7286d96..9cdd51e 100644
--- a/noncore/settings/networksettings2/ppp/ppp_NNI.cpp
+++ b/noncore/settings/networksettings2/ppp/ppp_NNI.cpp
@@ -125,54 +125,56 @@ void APPP::saveSpecificAttribute( QTextStream & TS ) {
125 125
126 TS << "runpreconnect=" << Data.Run.PreConnect << endl; 126 TS << "runpreconnect=" << Data.Run.PreConnect << endl;
127 TS << "runpostconnect=" << Data.Run.PostConnect << endl; 127 TS << "runpostconnect=" << Data.Run.PostConnect << endl;
128 TS << "runpredisconnect=" << Data.Run.PreDisconnect << endl; 128 TS << "runpredisconnect=" << Data.Run.PreDisconnect << endl;
129 TS << "runpostdisconnect=" << Data.Run.PostDisconnect << endl; 129 TS << "runpostdisconnect=" << Data.Run.PostDisconnect << endl;
130 130
131} 131}
132 132
133QWidget * APPP::edit( QWidget * parent ) { 133QWidget * APPP::edit( QWidget * parent ) {
134 GUI = new PPPEdit( parent ); 134 GUI = new PPPEdit( parent );
135 GUI->showData( Data ); 135 GUI->showData( Data );
136 return GUI; 136 return GUI;
137} 137}
138 138
139QString APPP::acceptable( void ) { 139QString APPP::acceptable( void ) {
140 return ( GUI ) ? GUI->acceptable( ) : QString(); 140 return ( GUI ) ? GUI->acceptable( ) : QString();
141} 141}
142 142
143void APPP::commit( void ) { 143void APPP::commit( void ) {
144 if( GUI && GUI->commit( Data ) ) { 144 if( GUI && GUI->commit( Data ) ) {
145 setModified( 1 ); 145 setModified( 1 );
146 } 146 }
147} 147}
148 148
149bool APPP::openFile( SystemFile & SF ) { 149bool APPP::openFile( SystemFile & SF, QStringList & SL ) {
150 if( SF.name() == "peers" ) { 150 if( SF.name() == "peers" ) {
151 SL << "/tmp/ppp" << "peers" ;
151 SF.setPath( removeSpaces( 152 SF.setPath( removeSpaces(
152 QString( "/tmp/ppp/peers/" ) + networkSetup()->name() ) ); 153 QString( "/tmp/ppp/peers/" ) + networkSetup()->name() ) );
153 return 1; 154 return 1;
154 } else if ( SF.name() == "chatscripts" ) { 155 } else if ( SF.name() == "chatscripts" ) {
156 SL << "/tmp/chatscripts";
155 SF.setPath( removeSpaces( 157 SF.setPath( removeSpaces(
156 QString( "/tmp/chatscripts/" ) + networkSetup()->name() ) ); 158 QString( "/tmp/chatscripts/" ) + networkSetup()->name() ) );
157 return 1; 159 return 1;
158 } 160 }
159 return 0; 161 return 0;
160} 162}
161 163
162short APPP::generateFile( SystemFile & SF, long DevNr ) { 164short APPP::generateFile( SystemFile & SF, long DevNr ) {
163 short rvl, rvd; 165 short rvl, rvd;
164 166
165 rvl = 1; 167 rvl = 1;
166 rvd = 1; 168 rvd = 1;
167 169
168 if( SF.name() == "pap-secrets" ) { 170 if( SF.name() == "pap-secrets" ) {
169 Log(("Generate PPP for %s\n", SF.name().latin1() )); 171 Log(("Generate PPP for %s\n", SF.name().latin1() ));
170 172
171 if( Data.Auth.Mode == 1 && Data.Auth.PCEMode == 0 ) { 173 if( Data.Auth.Mode == 1 && Data.Auth.PCEMode == 0 ) {
172 SF << "# secrets for " 174 SF << "# secrets for "
173 << networkSetup()->name().latin1() 175 << networkSetup()->name().latin1()
174 << endl; 176 << endl;
175 SF << Data.Auth.Client 177 SF << Data.Auth.Client
176 << " " 178 << " "
177 << Data.Auth.Server 179 << Data.Auth.Server
178 << " " 180 << " "