Diffstat (limited to 'noncore/settings/networksettings/ppp/pppdata.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/networksettings/ppp/pppdata.cpp | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/noncore/settings/networksettings/ppp/pppdata.cpp b/noncore/settings/networksettings/ppp/pppdata.cpp index 59d68c9..7a6524f 100644 --- a/noncore/settings/networksettings/ppp/pppdata.cpp +++ b/noncore/settings/networksettings/ppp/pppdata.cpp | |||
@@ -132,3 +132,3 @@ QString PPPData::readConfig(const QString &group, const QString &key, | |||
132 | { | 132 | { |
133 | // qDebug("PPPData::readConfig key >%s< group >%s<",key.latin1(), group.latin1()); | 133 | qDebug("PPPData::readConfig key >%s< group >%s<",key.latin1(), group.latin1()); |
134 | QString idx = SEP.arg(group).arg(key); | 134 | QString idx = SEP.arg(group).arg(key); |
@@ -349,2 +349,3 @@ const QString PPPData::modemDevice() { | |||
349 | bool PPPData::setModemDevice(const QString &n) { | 349 | bool PPPData::setModemDevice(const QString &n) { |
350 | qDebug("Setting modem dev to >%s<", n.latin1()); | ||
350 | bool ret = false; | 351 | bool ret = false; |
@@ -356,2 +357,3 @@ bool PPPData::setModemDevice(const QString &n) { | |||
356 | } | 357 | } |
358 | qDebug(ret?"SUCCESS":"FAILURE"); | ||
357 | return ret; | 359 | return ret; |
@@ -714,2 +716,3 @@ int PPPData::count() const { | |||
714 | bool PPPData::setAccount(const QString &aname) { | 716 | bool PPPData::setAccount(const QString &aname) { |
717 | qDebug("setting account to >%s<", aname.latin1()); | ||
715 | for(int i = 0; i <= highcount; i++) { | 718 | for(int i = 0; i <= highcount; i++) { |
@@ -718,2 +721,3 @@ bool PPPData::setAccount(const QString &aname) { | |||
718 | caccount = i; | 721 | caccount = i; |
722 | qDebug("SUCCESS"); | ||
719 | return true; | 723 | return true; |
@@ -721,2 +725,3 @@ bool PPPData::setAccount(const QString &aname) { | |||
721 | } | 725 | } |
726 | qDebug("FAILURE"); | ||
722 | return false; | 727 | return false; |
@@ -912,2 +917,5 @@ void PPPData::setStoredUsername(const QString &b) { | |||
912 | const QString PPPData::storedPassword() { | 917 | const QString PPPData::storedPassword() { |
918 | qDebug("getting stored pw"); | ||
919 | qDebug("g %s", cgroup.latin1() ); | ||
920 | qDebug("k %s", STORED_PASSWORD_KEY); | ||
913 | return readConfig(cgroup, STORED_PASSWORD_KEY, ""); | 921 | return readConfig(cgroup, STORED_PASSWORD_KEY, ""); |
@@ -1276 +1284,12 @@ void PPPData::setConfiguredInterfaces( QMap<QString,QString> ifaces ) | |||
1276 | } | 1284 | } |
1285 | |||
1286 | /** | ||
1287 | * pppd's getword() function knows about escape characters. | ||
1288 | * If we write the username and password to the secrets file | ||
1289 | * we'll therefore have to escape back slashes. | ||
1290 | */ | ||
1291 | QString PPPData::encodeWord(const QString &s) { | ||
1292 | QString r = s; | ||
1293 | r.replace(QRegExp("\\"), "\\\\"); | ||
1294 | return r; | ||
1295 | } | ||