-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 | |||
@@ -959,65 +959,65 @@ void Modem::parseargs(char* buf, char** args) { | |||
959 | 959 | ||
960 | while ((*buf == ' ' ) || (*buf == '\t' ) || (*buf == '\n' ) ) | 960 | while ((*buf == ' ' ) || (*buf == '\t' ) || (*buf == '\n' ) ) |
961 | *buf++ = '\0'; | 961 | *buf++ = '\0'; |
962 | 962 | ||
963 | // detect begin of quoted argument | 963 | // detect begin of quoted argument |
964 | if (*buf == '"' || *buf == '\'') { | 964 | if (*buf == '"' || *buf == '\'') { |
965 | quotes = *buf; | 965 | quotes = *buf; |
966 | *buf++ = '\0'; | 966 | *buf++ = '\0'; |
967 | } | 967 | } |
968 | 968 | ||
969 | // save the argument | 969 | // save the argument |
970 | if(*buf != '\0') { | 970 | if(*buf != '\0') { |
971 | *args++ = buf; | 971 | *args++ = buf; |
972 | nargs++; | 972 | nargs++; |
973 | } | 973 | } |
974 | 974 | ||
975 | if (!quotes) | 975 | if (!quotes) |
976 | while ((*buf != '\0') && (*buf != '\n') && | 976 | while ((*buf != '\0') && (*buf != '\n') && |
977 | (*buf != '\t') && (*buf != ' ')) | 977 | (*buf != '\t') && (*buf != ' ')) |
978 | buf++; | 978 | buf++; |
979 | else { | 979 | else { |
980 | while ((*buf != '\0') && (*buf != quotes)) | 980 | while ((*buf != '\0') && (*buf != quotes)) |
981 | buf++; | 981 | buf++; |
982 | *buf++ = '\0'; | 982 | *buf++ = '\0'; |
983 | } | 983 | } |
984 | } | 984 | } |
985 | 985 | ||
986 | *args = 0L; | 986 | *args = 0L; |
987 | } | 987 | } |
988 | 988 | ||
989 | bool Modem::execPPPDaemon(const QString & arguments) | 989 | bool Modem::execPPPDaemon(const QString & arguments) |
990 | { | 990 | { |
991 | if(execpppd(arguments)==0) { | 991 | if(execpppd(arguments)) { |
992 | _pppdata->setpppdRunning(true); | 992 | _pppdata->setpppdRunning(true); |
993 | return true; | 993 | return true; |
994 | } else | 994 | } else |
995 | return false; | 995 | return false; |
996 | } | 996 | } |
997 | 997 | ||
998 | void Modem::killPPPDaemon() | 998 | void Modem::killPPPDaemon() |
999 | { | 999 | { |
1000 | _pppdata->setpppdRunning(false); | 1000 | _pppdata->setpppdRunning(false); |
1001 | killpppd(); | 1001 | killpppd(); |
1002 | } | 1002 | } |
1003 | 1003 | ||
1004 | int Modem::pppdExitStatus() | 1004 | int Modem::pppdExitStatus() |
1005 | { | 1005 | { |
1006 | return _pppdExitStatus; | 1006 | return _pppdExitStatus; |
1007 | } | 1007 | } |
1008 | 1008 | ||
1009 | int Modem::openResolv(int flags) | 1009 | int Modem::openResolv(int flags) |
1010 | { | 1010 | { |
1011 | int fd; | 1011 | int fd; |
1012 | if ((fd = open(_PATH_RESCONF, flags)) == -1) { | 1012 | if ((fd = open(_PATH_RESCONF, flags)) == -1) { |
1013 | qDebug("error opening resolv.conf!"); | 1013 | qDebug("error opening resolv.conf!"); |
1014 | fd = open(DEVNULL, O_RDONLY); | 1014 | fd = open(DEVNULL, O_RDONLY); |
1015 | } | 1015 | } |
1016 | return fd; | 1016 | return fd; |
1017 | } | 1017 | } |
1018 | 1018 | ||
1019 | bool Modem::setHostname(const QString & name) | 1019 | bool Modem::setHostname(const QString & name) |
1020 | { | 1020 | { |
1021 | return sethostname(name, name.length()) == 0; | 1021 | return sethostname(name, name.length()) == 0; |
1022 | } | 1022 | } |
1023 | 1023 | ||