mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-03-27 20:41:54 +00:00
Properly name some bind address functions, cleanup logging
This commit is contained in:
@@ -1069,7 +1069,7 @@ namespace Emby.Server.Implementations
|
||||
return PublishedServerUrl.Trim('/');
|
||||
}
|
||||
|
||||
string smart = NetManager.GetBindInterface(remoteAddr, out var port);
|
||||
string smart = NetManager.GetBindAddress(remoteAddr, out var port);
|
||||
return GetLocalApiUrl(smart.Trim('/'), null, port);
|
||||
}
|
||||
|
||||
@@ -1118,7 +1118,7 @@ namespace Emby.Server.Implementations
|
||||
public string GetApiUrlForLocalAccess(IPAddress ipAddress = null, bool allowHttps = true)
|
||||
{
|
||||
// With an empty source, the port will be null
|
||||
var smart = NetManager.GetBindInterface(ipAddress, out _);
|
||||
var smart = NetManager.GetBindAddress(ipAddress, out _);
|
||||
var scheme = !allowHttps ? Uri.UriSchemeHttp : null;
|
||||
int? port = !allowHttps ? HttpPort : null;
|
||||
return GetLocalApiUrl(smart, scheme, port);
|
||||
|
||||
@@ -92,7 +92,7 @@ namespace Emby.Server.Implementations.EntryPoints
|
||||
}
|
||||
|
||||
var broadcastAddress = NetworkExtensions.GetBroadcastAddress(bindAddress.Subnet);
|
||||
_logger.LogDebug("Binding UDP server to {Address}", broadcastAddress.ToString());
|
||||
_logger.LogDebug("Binding UDP server to {Address} on port {PortNumber}", broadcastAddress.ToString(), PortNumber);
|
||||
|
||||
_udpServers.Add(new UdpServer(_logger, _appHost, _config, broadcastAddress, PortNumber));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user