Diffstat (limited to 'noncore/settings/networksettings/ppp/modem.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/networksettings/ppp/modem.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/noncore/settings/networksettings/ppp/modem.cpp b/noncore/settings/networksettings/ppp/modem.cpp index 79f015b..7b2e2a3 100644 --- a/noncore/settings/networksettings/ppp/modem.cpp +++ b/noncore/settings/networksettings/ppp/modem.cpp @@ -227,4 +227,4 @@ bool Modem::opentty() { - if(_pppdata->flowcontrol() != "None") { - if(_pppdata->flowcontrol() == "CRTSCTS") { + if(_pppdata->flowcontrol() != PPPData::FlowNone) { + if(_pppdata->flowcontrol() == PPPData::FlowHardware) { tty.c_cflag |= CRTSCTS; @@ -357,11 +357,15 @@ bool Modem::writeLine(const char *buf) { // different modems seem to need different line terminations - QString term = _pppdata->enter(); - if(term == "LF") + switch( _pppdata->enter() ) { + case PPPData::EndLF: b[len++]='\n'; - else if(term == "CR") + break; + case PPPData::EndCR: b[len++]='\r'; - else if(term == "CR/LF") { + break; + case PPPData::EndCRLF: b[len++]='\r'; b[len++]='\n'; + break; } + int l = len; |