author | tille <tille> | 2003-06-02 11:57:59 (UTC) |
---|---|---|
committer | tille <tille> | 2003-06-02 11:57:59 (UTC) |
commit | ec520ccd6a4696663269db36b7df74ffde13c70c (patch) (side-by-side diff) | |
tree | 7c2c27160740eac2f24d8654b25266f8de55663d /noncore/settings/networksettings/ppp/pppdata.cpp | |
parent | c002c647b15ea04f5a755b5edba5db0b280b1cbf (diff) | |
download | opie-ec520ccd6a4696663269db36b7df74ffde13c70c.zip opie-ec520ccd6a4696663269db36b7df74ffde13c70c.tar.gz opie-ec520ccd6a4696663269db36b7df74ffde13c70c.tar.bz2 |
basicly working now...
... but it's not yet tested...
... and you cannot input username and pw.
you can write a loginscript.
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, { -// qDebug("PPPData::readConfig key >%s< group >%s<",key.latin1(), group.latin1()); + qDebug("PPPData::readConfig key >%s< group >%s<",key.latin1(), group.latin1()); QString idx = SEP.arg(group).arg(key); @@ -349,2 +349,3 @@ const QString PPPData::modemDevice() { bool PPPData::setModemDevice(const QString &n) { + qDebug("Setting modem dev to >%s<", n.latin1()); bool ret = false; @@ -356,2 +357,3 @@ bool PPPData::setModemDevice(const QString &n) { } + qDebug(ret?"SUCCESS":"FAILURE"); return ret; @@ -714,2 +716,3 @@ int PPPData::count() const { bool PPPData::setAccount(const QString &aname) { + qDebug("setting account to >%s<", aname.latin1()); for(int i = 0; i <= highcount; i++) { @@ -718,2 +721,3 @@ bool PPPData::setAccount(const QString &aname) { caccount = i; + qDebug("SUCCESS"); return true; @@ -721,2 +725,3 @@ bool PPPData::setAccount(const QString &aname) { } + qDebug("FAILURE"); return false; @@ -912,2 +917,5 @@ void PPPData::setStoredUsername(const QString &b) { const QString PPPData::storedPassword() { + qDebug("getting stored pw"); + qDebug("g %s", cgroup.latin1() ); + qDebug("k %s", STORED_PASSWORD_KEY); return readConfig(cgroup, STORED_PASSWORD_KEY, ""); @@ -1276 +1284,12 @@ void PPPData::setConfiguredInterfaces( QMap<QString,QString> ifaces ) } + +/** + * pppd's getword() function knows about escape characters. + * If we write the username and password to the secrets file + * we'll therefore have to escape back slashes. + */ +QString PPPData::encodeWord(const QString &s) { + QString r = s; + r.replace(QRegExp("\\"), "\\\\"); + return r; +} |