Commit 9bb4ee8e authored by David Lechner's avatar David Lechner Committed by Commit Bot

[bluetooth] fix compile error in dbus fake bluetooth device client

This fixes a compile error that was accidentally introduced in
https://crrev.com/2191232. For unknown reasons this does not cause a
compile error with libc++, which is normally used with chromium, but
does cause an error with stdlibc++.

The API for preparing write requests was not changed in
https://crrev.com/2191232, so the change that introduced this error
was incorrect anyway. This reverts the change that introduced the
error and adds the kTypeRequest argument to the call to WriteValue()
since that was the API that was actually changed in the prior CL.

Bug: 1092470
Change-Id: I6f6fe90ab42aea3db8cac95b69aee5095ea33b31
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2237388Reviewed-by: default avatarSonny Sasaka <sonnysasaka@chromium.org>
Commit-Queue: David Lechner <david@pybricks.com>
Cr-Commit-Position: refs/heads/master@{#777365}
parent 241d7443
......@@ -649,10 +649,9 @@ void FakeBluetoothDeviceClient::ExecuteWrite(
for (const auto& prepare_write_request : prepare_write_requests_) {
bluez::BluezDBusManager::Get()
->GetBluetoothGattCharacteristicClient()
->WriteValue(std::get<0>(prepare_write_request),
std::get<1>(prepare_write_request),
std::get<2>(prepare_write_request), base::DoNothing(),
base::DoNothing());
->WriteValue(prepare_write_request.first, prepare_write_request.second,
bluetooth_gatt_characteristic::kTypeRequest,
base::DoNothing(), base::DoNothing());
}
prepare_write_requests_.clear();
std::move(callback).Run();
......
......@@ -384,7 +384,7 @@ class DEVICE_BLUETOOTH_EXPORT FakeBluetoothDeviceClient
bool delay_start_discovery_;
// Pending prepare write requests.
std::vector<std::tuple<dbus::ObjectPath, std::vector<uint8_t>, std::string>>
std::vector<std::pair<dbus::ObjectPath, std::vector<uint8_t>>>
prepare_write_requests_;
bool should_leave_connections_pending_;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment