From bad8738eb622340354c26b078ea8fa9e7aa3c5a4 Mon Sep 17 00:00:00 2001 From: hai007 Date: Fri, 6 Nov 2020 18:02:01 -0800 Subject: [PATCH] Roll forward to cl/341150519 Signed-off-by: hai007 --- cpp/core/internal/offline_frames_validator.cc | 3 ++- cpp/core/internal/wifi_lan_bwu_handler.cc | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/cpp/core/internal/offline_frames_validator.cc b/cpp/core/internal/offline_frames_validator.cc index b4e9944d..4a4aabba 100644 --- a/cpp/core/internal/offline_frames_validator.cc +++ b/cpp/core/internal/offline_frames_validator.cc @@ -21,6 +21,7 @@ using WifiAwareCredentials = UpgradePathInfo::WifiAwareCredentials; using WifiDirectCredentials = UpgradePathInfo::WifiDirectCredentials; using BluetoothCredentials = UpgradePathInfo::BluetoothCredentials; using WebRtcCredentials = UpgradePathInfo::WebRtcCredentials; +using Medium = location::nearby::connections::Medium; constexpr absl::string_view kIpv4PatternString{ "^([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\." @@ -225,7 +226,7 @@ Exception EnsureValidBandwidthUpgradePathAvailableFrame( const UpgradePathInfo& upgrade_path_info) { if (!upgrade_path_info.has_medium()) return {Exception::kInvalidProtocolBuffer}; - switch (upgrade_path_info.medium()) { + switch (static_cast(upgrade_path_info.medium())) { case Medium::WIFI_HOTSPOT: if (upgrade_path_info.has_wifi_hotspot_credentials()) { return EnsureValidBandwidthUpgradeWifiHotspotPathAvailableFrame( diff --git a/cpp/core/internal/wifi_lan_bwu_handler.cc b/cpp/core/internal/wifi_lan_bwu_handler.cc index 5c469427..de50d148 100644 --- a/cpp/core/internal/wifi_lan_bwu_handler.cc +++ b/cpp/core/internal/wifi_lan_bwu_handler.cc @@ -96,7 +96,7 @@ WifiLanBwuHandler::CreateUpgradedEndpointChannel( } const std::string& ip_address = wifi_lan_socket.ip_address(); - int32 port = wifi_lan_socket.wifi_port(); + std::int32_t port = wifi_lan_socket.wifi_port(); WifiLanService wifi_lan_service = wifi_lan_medium_.GetRemoteWifiLanService(ip_address, port);