summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-console/dialer.cpp24
-rw-r--r--noncore/apps/opie-console/io_modem.cpp10
-rw-r--r--noncore/apps/opie-console/io_serial.cpp7
3 files changed, 29 insertions, 12 deletions
diff --git a/noncore/apps/opie-console/dialer.cpp b/noncore/apps/opie-console/dialer.cpp
index ce2b688..8524422 100644
--- a/noncore/apps/opie-console/dialer.cpp
+++ b/noncore/apps/opie-console/dialer.cpp
@@ -91,2 +91,3 @@ void Dialer::setHangupOnly()
91 usercancel = 1; 91 usercancel = 1;
92 send("+++ATH\r");
92} 93}
@@ -100,3 +101,5 @@ void Dialer::slotCancel()
100 } 101 }
101 else accept(); 102 else {
103 accept();
104 }
102} 105}
@@ -142,5 +145,5 @@ void Dialer::trydial(const QString& number)
142 qWarning("HangupString " + m_profile.readEntry("HangupString")); 145 qWarning("HangupString " + m_profile.readEntry("HangupString"));
143 send(m_profile.readEntry("HangupString")); 146 //send(m_profile.readEntry("HangupString"));
144 //send("+++ATH"); 147 send("+++ATH\r");
145 send(""); 148 //send("");
146 } 149 }
@@ -189,3 +192,3 @@ void Dialer::trydial(const QString& number)
189 QString response5 = receive(); 192 QString response5 = receive();
190 if(!response5.contains("\n" + m_profile.readEntry("DefaultConnect"))) 193 if(!response5.contains("CONNECT") )
191 { 194 {
@@ -203,5 +206,7 @@ void Dialer::trydial(const QString& number)
203 206
207
204 if(state != state_cancel) 208 if(state != state_cancel)
205 { 209 {
206 switchState(state_online); 210 state = state_online;
211 slotCancel();
207 } 212 }
@@ -248,3 +253,3 @@ QString Dialer::receive()
248 buffer[ret] = 0; 253 buffer[ret] = 0;
249 //qWarning("Got: '%s'", buffer); 254 qWarning("Got: %s", buffer);
250 buf.append(QString(buffer)); 255 buf.append(QString(buffer));
@@ -255,3 +260,6 @@ QString Dialer::receive()
255 return buf; 260 return buf;
256 } 261 }else if (buf.contains("NO CARRIER") || buf.contains("NO DIALTONE") ) {
262 cleanshutdown = 1;
263 return QString::null;
264 }
257 } 265 }
diff --git a/noncore/apps/opie-console/io_modem.cpp b/noncore/apps/opie-console/io_modem.cpp
index b7901b9..896c24f 100644
--- a/noncore/apps/opie-console/io_modem.cpp
+++ b/noncore/apps/opie-console/io_modem.cpp
@@ -18,7 +18,9 @@ void IOModem::close() {
18 // Hangup, discarding result 18 // Hangup, discarding result
19 int fd = rawIO(); 19 //int fd = rawIO();
20 Dialer d(m_profile, fd); 20 internDetach();
21 Dialer d(m_profile, m_fd);
21 d.setHangupOnly(); 22 d.setHangupOnly();
22 d.exec(); 23 //d.exec();
23 closeRawIO(fd); 24 internAttach();
25 //closeRawIO(fd);
24 26
diff --git a/noncore/apps/opie-console/io_serial.cpp b/noncore/apps/opie-console/io_serial.cpp
index 0540d9e..03e92dd 100644
--- a/noncore/apps/opie-console/io_serial.cpp
+++ b/noncore/apps/opie-console/io_serial.cpp
@@ -5,2 +5,4 @@
5#include <unistd.h> 5#include <unistd.h>
6#include <stdio.h>
7
6#include "io_serial.h" 8#include "io_serial.h"
@@ -166,2 +168,7 @@ void IOSerial::dataArrived() {
166 return; 168 return;
169 qWarning("got from layer");
170 for (int i = 0; i < len; i++ ) {
171 printf("%c", array[i] );
172 }
173 printf("\n");
167 array.resize( len ); 174 array.resize( len );