Diffstat (limited to 'noncore/apps/opie-console/io_bt.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/apps/opie-console/io_bt.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/noncore/apps/opie-console/io_bt.cpp b/noncore/apps/opie-console/io_bt.cpp index 4486eea..8dd8151 100644 --- a/noncore/apps/opie-console/io_bt.cpp +++ b/noncore/apps/opie-console/io_bt.cpp @@ -23,8 +23,9 @@ void IOBt::close() { } } bool IOBt::open() { + bool ret = false; // only set up bt stuff if mac address was set, otherwise use the device set if ( !m_mac.isEmpty() ) { @@ -38,9 +39,9 @@ bool IOBt::open() { connect( m_attach, SIGNAL( processExited( OProcess* ) ), this, SLOT( slotExited( OProcess* ) ) ); if ( m_attach->start() ) { - IOSerial::open(); + ret = IOSerial::open(); } else { qWarning("could not attach to device"); delete m_attach; m_attach = 0; @@ -48,10 +49,11 @@ bool IOBt::open() { } else { // directly to the normal serial // TODO: look first if the connection really exists. ( is set up ) - IOSerial::open(); + ret =IOSerial::open(); } + return ret; } void IOBt::reload( const Profile &config ) { m_device = config.readEntry("Device", BT_DEFAULT_DEVICE); @@ -73,5 +75,6 @@ QString IOBt::name() const { } void IOBt::slotExited( OProcess* proc ){ close(); + delete proc; } |