mirror of
https://github.com/kidfromjupiter/nearby.git
synced 2026-09-16 15:36:12 -04:00
Move hotspot credential construction into each platform.
PiperOrigin-RevId: 826272274
This commit is contained in:
committed by
Copybara-Service
parent
03474168b5
commit
ca1ab209b7
@@ -134,9 +134,7 @@ HotspotCredentials* WifiHotspot::GetCredentials(absl::string_view service_id) {
|
||||
<< ". Use default credentials";
|
||||
return crendential;
|
||||
}
|
||||
crendential->SetGateway(it->second.GetIPAddress());
|
||||
crendential->SetPort(it->second.GetPort());
|
||||
|
||||
it->second.PopulateHotspotCredentials(*crendential);
|
||||
return crendential;
|
||||
}
|
||||
|
||||
@@ -165,7 +163,7 @@ bool WifiHotspot::StartAcceptingConnections(
|
||||
}
|
||||
|
||||
// "port=0" to let the platform to select an available port for the socket
|
||||
WifiHotspotServerSocket server_socket = medium_.ListenForService(/*port=*/0);
|
||||
WifiHotspotServerSocket server_socket = medium_.ListenForService();
|
||||
if (!server_socket.IsValid()) {
|
||||
LOG(INFO)
|
||||
<< "Failed to start accepting WifiHotspot connections for service_id="
|
||||
|
||||
Reference in New Issue
Block a user