summaryrefslogtreecommitdiff
path: root/noncore/net/opietooth/lib/device.cc
Unidiff
Diffstat (limited to 'noncore/net/opietooth/lib/device.cc') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/opietooth/lib/device.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/noncore/net/opietooth/lib/device.cc b/noncore/net/opietooth/lib/device.cc
index 2f04d46..88d4cf9 100644
--- a/noncore/net/opietooth/lib/device.cc
+++ b/noncore/net/opietooth/lib/device.cc
@@ -123,13 +123,14 @@ void Device::slotExited( OProcess* proc)
123 owarn << "Pid = " << pid << oendl; 123 owarn << "Pid = " << pid << oendl;
124 // now hciconfig hci0 up ( determine hciX FIXME) 124 // now hciconfig hci0 up ( determine hciX FIXME)
125 // and call hciconfig hci0 up 125 // and call hciconfig hci0 up
126 // FIXME hardcoded to hci0 now :( 126 // FIXME hardcoded to hci0 now :(
127 m_hci = new OProcess( ); 127 m_hci = new OProcess( );
128 *m_hci << "hciconfig"; 128 *m_hci << "hciconfig";
129 *m_hci << "hci0 up"; 129 *m_hci << "hci0";
130 *m_hci << "up";
130 connect(m_hci, SIGNAL( processExited(Opie::Core::OProcess*) ), 131 connect(m_hci, SIGNAL( processExited(Opie::Core::OProcess*) ),
131 this, SLOT( slotExited(Opie::Core::OProcess* ) ) ); 132 this, SLOT( slotExited(Opie::Core::OProcess* ) ) );
132 if(!m_hci->start() ){ 133 if(!m_hci->start() ){
133 owarn << "could not start" << oendl; 134 owarn << "could not start" << oendl;
134 m_attached = false; 135 m_attached = false;
135 emit device("hci0", false ); 136 emit device("hci0", false );
@@ -148,12 +149,14 @@ void Device::slotExited( OProcess* proc)
148 if( m_hci->normalExit() ){ 149 if( m_hci->normalExit() ){
149 owarn << "normal exit" << oendl; 150 owarn << "normal exit" << oendl;
150 int ret = m_hci->exitStatus(); 151 int ret = m_hci->exitStatus();
151 if( ret == 0 ){ 152 if( ret == 0 ){
152 owarn << "attached really really attached" << oendl; 153 owarn << "attached really really attached" << oendl;
153 m_attached = true; 154 m_attached = true;
155 //Wait for a device to be brought up
156 ::sleep(1);
154 emit device("hci0", true ); 157 emit device("hci0", true );
155 }else{ 158 }else{
156 owarn << "failed" << oendl; 159 owarn << "failed" << oendl;
157 emit device("hci0", false ); 160 emit device("hci0", false );
158 m_attached = false; 161 m_attached = false;
159 } 162 }