summaryrefslogtreecommitdiff
path: root/noncore
Side-by-side diff
Diffstat (limited to 'noncore') (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()
usercancel = 1;
+ send("+++ATH\r");
}
@@ -100,3 +101,5 @@ void Dialer::slotCancel()
}
- else accept();
+ else {
+ accept();
+ }
}
@@ -142,5 +145,5 @@ void Dialer::trydial(const QString& number)
qWarning("HangupString " + m_profile.readEntry("HangupString"));
- send(m_profile.readEntry("HangupString"));
- //send("+++ATH");
- send("");
+ //send(m_profile.readEntry("HangupString"));
+ send("+++ATH\r");
+ //send("");
}
@@ -189,3 +192,3 @@ void Dialer::trydial(const QString& number)
QString response5 = receive();
- if(!response5.contains("\n" + m_profile.readEntry("DefaultConnect")))
+ if(!response5.contains("CONNECT") )
{
@@ -203,5 +206,7 @@ void Dialer::trydial(const QString& number)
+
if(state != state_cancel)
{
- switchState(state_online);
+ state = state_online;
+ slotCancel();
}
@@ -248,3 +253,3 @@ QString Dialer::receive()
buffer[ret] = 0;
- //qWarning("Got: '%s'", buffer);
+ qWarning("Got: %s", buffer);
buf.append(QString(buffer));
@@ -255,3 +260,6 @@ QString Dialer::receive()
return buf;
- }
+ }else if (buf.contains("NO CARRIER") || buf.contains("NO DIALTONE") ) {
+ cleanshutdown = 1;
+ return QString::null;
+ }
}
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() {
// Hangup, discarding result
- int fd = rawIO();
- Dialer d(m_profile, fd);
+// int fd = rawIO();
+ internDetach();
+ Dialer d(m_profile, m_fd);
d.setHangupOnly();
- d.exec();
- closeRawIO(fd);
+ //d.exec();
+ internAttach();
+// closeRawIO(fd);
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 @@
#include <unistd.h>
+#include <stdio.h>
+
#include "io_serial.h"
@@ -166,2 +168,7 @@ void IOSerial::dataArrived() {
return;
+ qWarning("got from layer");
+ for (int i = 0; i < len; i++ ) {
+ printf("%c", array[i] );
+ }
+ printf("\n");
array.resize( len );