Increase the priority of the thread handling the HCI events, + a bit formatting
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28728 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -46,7 +46,8 @@ BluetoothServer::BluetoothServer() : BApplication(BLUETOOTH_SIGNATURE)
|
|||||||
fDeviceManager = new DeviceManager();
|
fDeviceManager = new DeviceManager();
|
||||||
fLocalDevicesList.MakeEmpty();
|
fLocalDevicesList.MakeEmpty();
|
||||||
|
|
||||||
fEventListener = spawn_thread(notification_Thread, "BT port listener" , B_DISPLAY_PRIORITY , this);
|
// TODO: Some events should be handled faster than in KL...
|
||||||
|
fEventListener = spawn_thread(notification_Thread, "BT port listener" , B_URGENT_DISPLAY_PRIORITY , this);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -80,20 +80,17 @@ printf("### \n");
|
|||||||
//HardwareError(event);
|
//HardwareError(event);
|
||||||
return;
|
return;
|
||||||
case HCI_EVENT_CONN_REQUEST:
|
case HCI_EVENT_CONN_REQUEST:
|
||||||
ConnectionRequest((struct hci_ev_conn_request*)(event+1), NULL); // incoming request
|
ConnectionRequest((struct hci_ev_conn_request*)(event+1), NULL);
|
||||||
return;
|
return;
|
||||||
break;
|
|
||||||
|
|
||||||
case HCI_EVENT_CONN_COMPLETE:
|
case HCI_EVENT_CONN_COMPLETE:
|
||||||
ConnectionComplete((struct hci_ev_conn_complete*)(event+1), NULL); // should belong to a request?
|
// should belong to a request? can be sporadic or initiated by us¿?...
|
||||||
return; // can be sporadic or initiated by us¿?...
|
ConnectionComplete((struct hci_ev_conn_complete*)(event+1), NULL);
|
||||||
break;
|
return;
|
||||||
|
|
||||||
case HCI_EVENT_PIN_CODE_REQ:
|
case HCI_EVENT_PIN_CODE_REQ:
|
||||||
PinCodeRequest((struct hci_ev_pin_code_req*)(event+1), NULL);
|
PinCodeRequest((struct hci_ev_pin_code_req*)(event+1), NULL);
|
||||||
return;
|
return;
|
||||||
break;
|
|
||||||
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
// lets go on
|
// lets go on
|
||||||
@@ -137,6 +134,7 @@ printf("### \n");
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case HCI_EVENT_DISCONNECTION_COMPLETE:
|
case HCI_EVENT_DISCONNECTION_COMPLETE:
|
||||||
|
// should belong to a request? can be sporadic or initiated by us¿?...
|
||||||
DisconnectionComplete((struct hci_ev_disconnection_complete_reply*)(event+1), request);
|
DisconnectionComplete((struct hci_ev_disconnection_complete_reply*)(event+1), request);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user