summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings/ppp/modem.cpp
Unidiff
Diffstat (limited to 'noncore/settings/networksettings/ppp/modem.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/networksettings/ppp/modem.cpp30
1 files changed, 15 insertions, 15 deletions
diff --git a/noncore/settings/networksettings/ppp/modem.cpp b/noncore/settings/networksettings/ppp/modem.cpp
index a2f77c5..cd5d21c 100644
--- a/noncore/settings/networksettings/ppp/modem.cpp
+++ b/noncore/settings/networksettings/ppp/modem.cpp
@@ -103,3 +103,3 @@ speed_t Modem::modemspeed() {
103 // other systems may not have them 103 // other systems may not have them
104 int i = gpppdata.speed().toInt()/100; 104 int i = PPPData::data()->speed().toInt()/100;
105 105
@@ -153,3 +153,3 @@ bool Modem::opentty() {
153 close(modemfd); 153 close(modemfd);
154// device = "/dev/modem";//deviceByIndex(request.modem.deviceNum); 154 device = PPPData::data()->modemDevice();
155 if ((modemfd = open(device, O_RDWR|O_NDELAY|O_NOCTTY)) == -1) { 155 if ((modemfd = open(device, O_RDWR|O_NDELAY|O_NOCTTY)) == -1) {
@@ -163,3 +163,3 @@ bool Modem::opentty() {
163#if 0 163#if 0
164 if(gpppdata.UseCDLine()) { 164 if(PPPData::data()->UseCDLine()) {
165 if(ioctl(modemfd, TIOCMGET, &flags) == -1) { 165 if(ioctl(modemfd, TIOCMGET, &flags) == -1) {
@@ -211,4 +211,4 @@ bool Modem::opentty() {
211 211
212 if(gpppdata.flowcontrol() != "None") { 212 if(PPPData::data()->flowcontrol() != "None") {
213 if(gpppdata.flowcontrol() == "CRTSCTS") { 213 if(PPPData::data()->flowcontrol() == "CRTSCTS") {
214 tty.c_cflag |= CRTSCTS; 214 tty.c_cflag |= CRTSCTS;
@@ -341,3 +341,3 @@ bool Modem::writeLine(const char *buf) {
341 // different modems seem to need different line terminations 341 // different modems seem to need different line terminations
342 QString term = gpppdata.enter(); 342 QString term = PPPData::data()->enter();
343 if(term == "LF") 343 if(term == "LF")
@@ -381,5 +381,5 @@ bool Modem::hangup() {
381 // Then hangup command 381 // Then hangup command
382 writeLine(gpppdata.modemHangupStr().local8Bit()); 382 writeLine(PPPData::data()->modemHangupStr().local8Bit());
383 383
384 usleep(gpppdata.modemInitDelay() * 10000); // 0.01 - 3.0 sec 384 usleep(PPPData::data()->modemInitDelay() * 10000); // 0.01 - 3.0 sec
385 385
@@ -419,3 +419,3 @@ bool Modem::hangup() {
419 419
420 usleep(gpppdata.modemInitDelay() * 10000); // 0.01 - 3.0 secs 420 usleep(PPPData::data()->modemInitDelay() * 10000); // 0.01 - 3.0 secs
421 421
@@ -442,7 +442,7 @@ void Modem::escape_to_command_mode() {
442 // +3 because quiet time must be greater than guard time. 442 // +3 because quiet time must be greater than guard time.
443 usleep((gpppdata.modemEscapeGuardTime()+3)*20000); 443 usleep((PPPData::data()->modemEscapeGuardTime()+3)*20000);
444 QCString tmp = gpppdata.modemEscapeStr().local8Bit(); 444 QCString tmp = PPPData::data()->modemEscapeStr().local8Bit();
445 write(modemfd, tmp.data(), tmp.length()); 445 write(modemfd, tmp.data(), tmp.length());
446 tcflush(modemfd, TCIOFLUSH); 446 tcflush(modemfd, TCIOFLUSH);
447 usleep((gpppdata.modemEscapeGuardTime()+3)*20000); 447 usleep((PPPData::data()->modemEscapeGuardTime()+3)*20000);
448 448
@@ -562,3 +562,3 @@ int Modem::lockdevice() {
562 562
563 if(!gpppdata.modemLockFile()) { 563 if(!PPPData::data()->modemLockFile()) {
564 qDebug("The user doesn't want a lockfile."); 564 qDebug("The user doesn't want a lockfile.");
@@ -571,3 +571,3 @@ int Modem::lockdevice() {
571 QString lockfile = LOCK_DIR"/LCK.."; 571 QString lockfile = LOCK_DIR"/LCK..";
572 lockfile += gpppdata.modemDevice().mid(5); // append everything after /dev/ 572 lockfile += PPPData::data()->modemDevice().mid(5); // append everything after /dev/
573 573
@@ -602,3 +602,3 @@ if ((fd = openLockfile(QFile::encodeName(lockfile), O_RDONLY)) >= 0) {
602 602
603 fd = openLockfile(gpppdata.modemDevice(),O_WRONLY|O_TRUNC|O_CREAT); 603 fd = openLockfile(PPPData::data()->modemDevice(),O_WRONLY|O_TRUNC|O_CREAT);
604 if(fd >= 0) { 604 if(fd >= 0) {