summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings/ppp/pppdata.cpp
authortille <tille>2003-06-03 14:08:04 (UTC)
committer tille <tille>2003-06-03 14:08:04 (UTC)
commit60d9f66d2b31c659ac652c15423ecaca89a5f312 (patch) (side-by-side diff)
treebfda269b58eb1c72893057d9d7fae5a6a2e45abc /noncore/settings/networksettings/ppp/pppdata.cpp
parentaaf7709f64dda5a6cb81eeb96e421ba4189654d6 (diff)
downloadopie-60d9f66d2b31c659ac652c15423ecaca89a5f312.zip
opie-60d9f66d2b31c659ac652c15423ecaca89a5f312.tar.gz
opie-60d9f66d2b31c659ac652c15423ecaca89a5f312.tar.bz2
authentication (except when passwd not stored)
and minor things
Diffstat (limited to 'noncore/settings/networksettings/ppp/pppdata.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/networksettings/ppp/pppdata.cpp26
1 files changed, 15 insertions, 11 deletions
diff --git a/noncore/settings/networksettings/ppp/pppdata.cpp b/noncore/settings/networksettings/ppp/pppdata.cpp
index 23db409..8f066ff 100644
--- a/noncore/settings/networksettings/ppp/pppdata.cpp
+++ b/noncore/settings/networksettings/ppp/pppdata.cpp
@@ -43,11 +43,12 @@
PPPData::PPPData()
: modemDeviceGroup(-1),
- highcount(-1), // start out with no entries
- caccount(-1), // set the current account index also
- suidprocessid(-1), // process ID of setuid child
- pppdisrunning(false),
- pppderror(0)
+ passwd(""),
+ highcount(-1), // start out with no entries
+ caccount(-1), // set the current account index also
+ suidprocessid(-1), // process ID of setuid child
+ pppdisrunning(false),
+ pppderror(0)
{
highcount = readNumConfig(GENERAL_GRP, NUMACCOUNTS_KEY, 0) - 1;
@@ -217,8 +218,9 @@ void PPPData::writeListConfig(const QString &group, const QString &key,
//
// functions to set/return general information
//
-QString PPPData::password() const {
- return passwd;
+QString PPPData::password(){
+ if ( storePassword() ) return storedPassword();
+ else return passwd;
}
@@ -753,7 +755,7 @@ bool PPPData::isUniqueAccname(const QString &n) {
bool PPPData::deleteAccount() {
- //FIXME:
+ //FIXME: PPPData::deleteAccount
// if(caccount < 0)
return false;
@@ -826,7 +828,7 @@ int PPPData::newaccount() {
}
int PPPData::copyaccount(int i) {
-// FIXME
+// FIXME: PPPData::copyaccount
// if(highcount >= MAX_ACCOUNTS)
return -1;
@@ -1276,12 +1278,14 @@ void PPPData::setConfiguredInterfaces( QMap<QString,QString> ifaces )
QMap<QString,QString>::Iterator it;
int i = 0;
Config cfg = config();
- for( it = ifaces.begin(); it != ifaces.end(); ++it, ++i ){
- cfg.setGroup(QString("%1_%1").arg(ACCLIST_GRP).arg(i));
+ for( it = ifaces.begin(); it != ifaces.end(); ++it ){
+ cfg.setGroup(QString("%1_%1").arg(ACCLIST_GRP).arg(i++));
cfg.writeEntry( ACOUNTS_DEV, it.key() );
cfg.writeEntry( ACOUNTS_ACC, it.data() );
+ qDebug("I %i",i);
}
cfg.setGroup( ACCLIST_GRP );
+ qDebug("saved %i account settings", i);
cfg.writeEntry( ACCOUNTS_COUNT, i );
}