-rw-r--r-- | noncore/apps/opie-console/io_modem.cpp | 6 | ||||
-rw-r--r-- | noncore/apps/opie-console/io_serial.cpp | 1 | ||||
-rw-r--r-- | noncore/apps/opie-console/mainwindow.cpp | 10 |
3 files changed, 13 insertions, 4 deletions
diff --git a/noncore/apps/opie-console/io_modem.cpp b/noncore/apps/opie-console/io_modem.cpp index 22a3673..41f553b 100644 --- a/noncore/apps/opie-console/io_modem.cpp +++ b/noncore/apps/opie-console/io_modem.cpp @@ -33,3 +33,7 @@ bool IOModem::open() { } - else return false; + else + { + close(); + return false; + } } diff --git a/noncore/apps/opie-console/io_serial.cpp b/noncore/apps/opie-console/io_serial.cpp index b89a53b..cc63c58 100644 --- a/noncore/apps/opie-console/io_serial.cpp +++ b/noncore/apps/opie-console/io_serial.cpp @@ -48,2 +48,3 @@ bool IOSerial::open() { emit error(CouldNotOpen, strerror(errno)); + m_fd = 0; return FALSE; diff --git a/noncore/apps/opie-console/mainwindow.cpp b/noncore/apps/opie-console/mainwindow.cpp index 4326609..9ccefa0 100644 --- a/noncore/apps/opie-console/mainwindow.cpp +++ b/noncore/apps/opie-console/mainwindow.cpp @@ -320,4 +320,6 @@ void MainWindow::slotConnect() { QObject::tr("Connecting failed for this session.")); - m_connect->setEnabled( false ); - m_disconnect->setEnabled( true ); + else { + m_connect->setEnabled( false ); + m_disconnect->setEnabled( true ); + } } @@ -366,3 +368,5 @@ void MainWindow::slotClose() { qWarning("removing! currentSession %s", currentSession()->name().latin1() ); - tabWidget()->remove( currentSession() ); + /* set to NULL to be safe, if its needed slotSessionChanged resets it automatically */ + m_curSession = NULL; + tabWidget()->remove( /*currentSession()*/ses ); /*it's autodelete */ |