Chromium Code Reviews| Index: device/bluetooth/bluetooth_classic_win.cc |
| diff --git a/device/bluetooth/bluetooth_classic_win.cc b/device/bluetooth/bluetooth_classic_win.cc |
| index 2f19cb1bb9f206ded6ed465644cb9c17c2492896..18e2f3660adfce03dca97d25767b2e4d3d4a440a 100644 |
| --- a/device/bluetooth/bluetooth_classic_win.cc |
| +++ b/device/bluetooth/bluetooth_classic_win.cc |
| @@ -35,7 +35,16 @@ BluetoothClassicWrapper::~BluetoothClassicWrapper() {} |
| HBLUETOOTH_RADIO_FIND BluetoothClassicWrapper::FindFirstRadio( |
| const BLUETOOTH_FIND_RADIO_PARAMS* params, |
| HANDLE* out_handle) { |
| - return BluetoothFindFirstRadio(params, out_handle); |
| + HANDLE radio_handle = NULL; |
| + HBLUETOOTH_RADIO_FIND radio_find_handle = |
| + BluetoothFindFirstRadio(params, &radio_handle); |
| + if (radio_find_handle) { |
| + if (opened_radio_handle_.IsValid()) |
|
scheib
2016/02/07 01:45:18
.Set() performs Close (and in that, IsValid). So j
gogerald1
2016/02/08 17:00:04
Done.
|
| + opened_radio_handle_.Close(); |
| + opened_radio_handle_.Set(radio_handle); |
| + *out_handle = opened_radio_handle_.Get(); |
| + } |
| + return radio_find_handle; |
| } |
| DWORD BluetoothClassicWrapper::GetRadioInfo( |