Diffstat (limited to 'noncore/net/opietooth/lib/device.cc') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/net/opietooth/lib/device.cc | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/noncore/net/opietooth/lib/device.cc b/noncore/net/opietooth/lib/device.cc index 40acbd2..2f04d46 100644 --- a/noncore/net/opietooth/lib/device.cc +++ b/noncore/net/opietooth/lib/device.cc @@ -22,8 +22,7 @@ namespace { QString string( par ); QStringList list = QStringList::split( '\n', string ); - for( QStringList::Iterator it = list.begin(); it != list.end(); ++it ) - { + for( QStringList::Iterator it = list.begin(); it != list.end(); ++it ) { owarn << "parsePID: " << (*it).latin1() << oendl; // FIXME mbhaynie: Surely there is a better way to skip @@ -35,8 +34,7 @@ namespace { if( (*it).startsWith("TI") ) continue; if( (*it).startsWith("Loading") ) continue; if( (*it).startsWith("BTS") ) continue; - if( !(*it).startsWith("CSR") ) - { + if( !(*it).startsWith("CSR") ) { id = (*it).toInt(); break; } @@ -75,13 +73,9 @@ void Device::attach(){ // FIXME -- this is a hack for an odd hciattach interface. if ( ODevice::inst()->modelString() == "HX4700" ) - { *m_process << "-S" << "/etc/bluetooth/TIInit_3.2.26.bts" << "/dev/ttyS1" << "texas"; - } else - { *m_process << m_device << m_mode << m_speed; - } connect(m_process, SIGNAL( processExited(Opie::Core::OProcess*) ), this, SLOT( slotExited(Opie::Core::OProcess* ) ) ); connect(m_process, SIGNAL( receivedStdout(Opie::Core::OProcess*, char*, int) ), @@ -93,16 +87,18 @@ void Device::attach(){ delete m_process; m_process = 0; } - }; + } } void Device::detach(){ delete m_hci; + m_hci = 0; delete m_process; + m_process = 0; // kill the pid we got if(m_attached ){ //kill the pid owarn << "killing" << oendl; - kill(pid, 9); + ::kill(pid, 9); } owarn << "detached" << oendl; } |