btdrv-mitm: fixed typos and removed some unhandled states

This commit is contained in:
ndeadly 2020-08-05 01:32:43 +02:00
parent 9ced06f2a6
commit e310d89491

View file

@ -68,13 +68,13 @@ namespace ams::bluetooth::core {
}
}
void handlePinRequesEvent(EventData *eventData) {
void handlePinRequestEvent(EventData *eventData) {
if (controller::IsController(&eventData->pinReply.cod) && !controller::IsValidSwitchControllerName(eventData->pinReply.name)) {
std::strncpy(eventData->pinReply.name, controller::proControllerName, sizeof(BluetoothName) - 1);
}
}
void handleSspRequesEvent(EventData *eventData) {
void handleSspRequestEvent(EventData *eventData) {
if (controller::IsController(&eventData->sspReply.cod) && !controller::IsValidSwitchControllerName(eventData->sspReply.name)) {
std::strncpy(eventData->sspReply.name, controller::proControllerName, sizeof(BluetoothName) - 1);
}
@ -94,15 +94,11 @@ namespace ams::bluetooth::core {
case BluetoothEvent_DeviceFound:
handleDeviceFoundEvent(eventData);
break;
case BluetoothEvent_DiscoveryStateChanged:
break;
case BluetoothEvent_PinRequest:
handlePinRequesEvent(eventData);
handlePinRequestEvent(eventData);
break;
case BluetoothEvent_SspRequest:
handleSspRequesEvent(eventData);
break;
case BluetoothEvent_BondStateChanged:
handleSspRequestEvent(eventData);
break;
default:
break;