author | dwmw2 <dwmw2> | 2003-06-07 16:05:15 (UTC) |
---|---|---|
committer | dwmw2 <dwmw2> | 2003-06-07 16:05:15 (UTC) |
commit | 1adb158cfd65a5771af279e0e774f45fcc860faf (patch) (side-by-side diff) | |
tree | 52bb6951850ddae823a1a1ebcab1c7e6775cef84 | |
parent | e02157a68d186a17778d3b393a327660df5fbac3 (diff) | |
download | opie-1adb158cfd65a5771af279e0e774f45fcc860faf.zip opie-1adb158cfd65a5771af279e0e774f45fcc860faf.tar.gz opie-1adb158cfd65a5771af279e0e774f45fcc860faf.tar.bz2 |
execpppd returns true on success, not zero
-rw-r--r-- | noncore/settings/networksettings/ppp/modem.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/settings/networksettings/ppp/modem.cpp b/noncore/settings/networksettings/ppp/modem.cpp index 2da9b14..d23fee4 100644 --- a/noncore/settings/networksettings/ppp/modem.cpp +++ b/noncore/settings/networksettings/ppp/modem.cpp @@ -943,81 +943,81 @@ bool Modem::killpppd() { } } return true; } void Modem::parseargs(char* buf, char** args) { int nargs = 0; int quotes; while(nargs < MaxArgs-1 && *buf != '\0') { quotes = 0; // Strip whitespace. Use nulls, so that the previous argument is // terminated automatically. while ((*buf == ' ' ) || (*buf == '\t' ) || (*buf == '\n' ) ) *buf++ = '\0'; // detect begin of quoted argument if (*buf == '"' || *buf == '\'') { quotes = *buf; *buf++ = '\0'; } // save the argument if(*buf != '\0') { *args++ = buf; nargs++; } if (!quotes) while ((*buf != '\0') && (*buf != '\n') && (*buf != '\t') && (*buf != ' ')) buf++; else { while ((*buf != '\0') && (*buf != quotes)) buf++; *buf++ = '\0'; } } *args = 0L; } bool Modem::execPPPDaemon(const QString & arguments) { - if(execpppd(arguments)==0) { + if(execpppd(arguments)) { _pppdata->setpppdRunning(true); return true; } else return false; } void Modem::killPPPDaemon() { _pppdata->setpppdRunning(false); killpppd(); } int Modem::pppdExitStatus() { return _pppdExitStatus; } int Modem::openResolv(int flags) { int fd; if ((fd = open(_PATH_RESCONF, flags)) == -1) { qDebug("error opening resolv.conf!"); fd = open(DEVNULL, O_RDONLY); } return fd; } bool Modem::setHostname(const QString & name) { return sethostname(name, name.length()) == 0; } |