aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShadowghost <Ghost_of_Stone@web.de>2022-07-21 19:17:44 +0200
committerShadowghost <Ghost_of_Stone@web.de>2022-07-21 19:17:44 +0200
commitcea8e8bbf601b97119c8b0b0a2e666414b53050c (patch)
tree4a5817712e2ceabd56fff970fa054f9cf75add3c
parentb5c1d6129e394e40cd8a6bf338184edfe58c0ef4 (diff)
Fix logging output
-rw-r--r--Emby.Dlna/Main/DlnaEntryPoint.cs2
-rw-r--r--Jellyfin.Networking/Manager/NetworkManager.cs33
2 files changed, 20 insertions, 15 deletions
diff --git a/Emby.Dlna/Main/DlnaEntryPoint.cs b/Emby.Dlna/Main/DlnaEntryPoint.cs
index 89119d31d..0aea7855a 100644
--- a/Emby.Dlna/Main/DlnaEntryPoint.cs
+++ b/Emby.Dlna/Main/DlnaEntryPoint.cs
@@ -307,7 +307,7 @@ namespace Emby.Dlna.Main
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);
diff --git a/Jellyfin.Networking/Manager/NetworkManager.cs b/Jellyfin.Networking/Manager/NetworkManager.cs
index b1112626c..12edb0e55 100644
--- a/Jellyfin.Networking/Manager/NetworkManager.cs
+++ b/Jellyfin.Networking/Manager/NetworkManager.cs
@@ -933,22 +933,27 @@ namespace Jellyfin.Networking.Manager
.OrderBy(x => x.Index)
.ToList();
- if (isInExternalSubnet && externalInterfaces.Any())
+ if (isInExternalSubnet)
{
- // 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.
- bindAddress = externalInterfaces
- .OrderByDescending(x => x.Subnet.Contains(source))
- .ThenBy(x => x.Index)
- .Select(x => x.Address)
- .FirstOrDefault();
-
- if (bindAddress != null)
+ if (externalInterfaces.Any())
{
- result = NetworkExtensions.FormatIpString(bindAddress);
- _logger.LogDebug("{Source}: GetBindInterface: Has source, found a matching external bind interface. {Result}", source, result);
- return true;
+ // 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.
+ bindAddress = externalInterfaces
+ .OrderByDescending(x => x.Subnet.Contains(source))
+ .ThenBy(x => x.Index)
+ .Select(x => x.Address)
+ .FirstOrDefault();
+
+ if (bindAddress != null)
+ {
+ result = NetworkExtensions.FormatIpString(bindAddress);
+ _logger.LogDebug("{Source}: GetBindInterface: Has source, found a matching external bind interface. {Result}", source, result);
+ return true;
+ }
}
+
+ _logger.LogWarning("{Source}: External request received, no external interface bind found, trying internal interfaces.", source);
}
else
{
@@ -963,7 +968,7 @@ namespace Jellyfin.Networking.Manager
if (bindAddress != null)
{
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;
}
}