mirror of
https://github.com/kidfromjupiter/nearby.git
synced 2026-09-16 15:36:12 -04:00
Add flag for DHCP renewal
PiperOrigin-RevId: 817413881
This commit is contained in:
committed by
Copybara-Service
parent
585734283e
commit
60d0c85d53
@@ -53,6 +53,10 @@ constexpr auto kWifiHotspotConnectionIntervalMillis =
|
||||
constexpr auto kWifiHotspotConnectionTimeoutMillis =
|
||||
flags::Flag<int64_t>(kConfigPackage, "45415888", 10000);
|
||||
|
||||
// Enable/Disable DHCP renewal when connecting to hotspot.
|
||||
constexpr auto kEnableHotspotDhcpRenew =
|
||||
flags::Flag<bool>(kConfigPackage, "45731858", false);
|
||||
|
||||
// Enable/Disable Intel PIe SDK to query/set WIFI feature.
|
||||
constexpr auto kEnableIntelPieSdk =
|
||||
flags::Flag<bool>(kConfigPackage, "45428547", false);
|
||||
|
||||
@@ -449,8 +449,11 @@ bool WifiHotspotMedium::ConnectWifiHotspot(
|
||||
LOG(INFO) << "Check IP address at attempt " << i;
|
||||
|
||||
if (!wifi_hotspot_native_.HasAssignedAddress()) {
|
||||
// TODO: ftsui - Add flag to control this.
|
||||
wifi_hotspot_native_.RenewIpv4Address();
|
||||
if (NearbyFlags::GetInstance().GetBoolFlag(
|
||||
platform::config_package_nearby::nearby_platform_feature::
|
||||
kEnableHotspotDhcpRenew)) {
|
||||
wifi_hotspot_native_.RenewIpv4Address();
|
||||
}
|
||||
Sleep(ip_address_retry_interval_millis);
|
||||
continue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user