Fix logging output

This commit is contained in:
Shadowghost 2022-07-21 19:17:44 +02:00
parent b5c1d6129e
commit cea8e8bbf6
2 changed files with 20 additions and 15 deletions

View File

@ -307,7 +307,7 @@ namespace Emby.Dlna.Main
var fullService = "urn:schemas-upnp-org:device:MediaServer:1"; var fullService = "urn:schemas-upnp-org:device:MediaServer:1";
_logger.LogInformation("Registering publisher for {ResourceName} on {DeviceAddress}", fullService, address); _logger.LogInformation("Registering publisher for {ResourceName} on {DeviceAddress}", fullService, address.Address);
var uri = new UriBuilder(_appHost.GetApiUrlForLocalAccess(address.Address, false) + descriptorUri); var uri = new UriBuilder(_appHost.GetApiUrlForLocalAccess(address.Address, false) + descriptorUri);

View File

@ -933,7 +933,9 @@ namespace Jellyfin.Networking.Manager
.OrderBy(x => x.Index) .OrderBy(x => x.Index)
.ToList(); .ToList();
if (isInExternalSubnet && externalInterfaces.Any()) if (isInExternalSubnet)
{
if (externalInterfaces.Any())
{ {
// Check to see if any of the external bind interfaces are in the same subnet as the source. // Check to see if any of the external bind interfaces are in the same subnet as the source.
// If none exists, this will select the first external interface if there is one. // If none exists, this will select the first external interface if there is one.
@ -950,6 +952,9 @@ namespace Jellyfin.Networking.Manager
return true; return true;
} }
} }
_logger.LogWarning("{Source}: External request received, no external interface bind found, trying internal interfaces.", source);
}
else else
{ {
// Check to see if any of the internal bind interfaces are in the same subnet as the source. // Check to see if any of the internal bind interfaces are in the same subnet as the source.
@ -963,7 +968,7 @@ namespace Jellyfin.Networking.Manager
if (bindAddress != null) if (bindAddress != null)
{ {
result = NetworkExtensions.FormatIpString(bindAddress); result = NetworkExtensions.FormatIpString(bindAddress);
_logger.LogWarning("{Source}: External request received, only an internal interface bind found. {Result}", source, result); _logger.LogWarning("{Source}: Request received, matching internal interface bind found. {Result}", source, result);
return true; return true;
} }
} }