aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShadowghost <Ghost_of_Stone@web.de>2022-12-13 10:39:37 +0100
committerShadowghost <Ghost_of_Stone@web.de>2022-12-13 10:39:37 +0100
commitb725fbe51af22ca270912eeb4929a8ee2a3b37a4 (patch)
tree6d1edba763743a774a13f06dda24fe81589ffb9c
parent3f6354cdb832560ec811f1766666dd9ca1f2a208 (diff)
Apply review suggestions
-rw-r--r--Emby.Dlna/Main/DlnaEntryPoint.cs2
-rw-r--r--Emby.Server.Implementations/ApplicationHost.cs4
-rw-r--r--Emby.Server.Implementations/Net/SocketFactory.cs2
-rw-r--r--tests/Jellyfin.Server.Tests/ParseNetworkTests.cs2
4 files changed, 5 insertions, 5 deletions
diff --git a/Emby.Dlna/Main/DlnaEntryPoint.cs b/Emby.Dlna/Main/DlnaEntryPoint.cs
index ec483199d..22903ec8f 100644
--- a/Emby.Dlna/Main/DlnaEntryPoint.cs
+++ b/Emby.Dlna/Main/DlnaEntryPoint.cs
@@ -288,7 +288,7 @@ namespace Emby.Dlna.Main
var bindAddresses = _networkManager
.GetInternalBindAddresses()
.Where(i => i.Address.AddressFamily == AddressFamily.InterNetwork
- || (i.AddressFamily == AddressFamily.InterNetworkV6 && i.Address.ScopeId != 0))
+ || (i.AddressFamily == AddressFamily.InterNetworkV6 && i.Address.ScopeId != 0))
.ToList();
if (bindAddresses.Count == 0)
diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.cs
index df4f3e676..d0c744d2f 100644
--- a/Emby.Server.Implementations/ApplicationHost.cs
+++ b/Emby.Server.Implementations/ApplicationHost.cs
@@ -1094,8 +1094,8 @@ namespace Emby.Server.Implementations
{
int? requestPort = request.Host.Port;
if (requestPort == null
- || (requestPort == 80 && string.Equals(request.Scheme, "http", StringComparison.OrdinalIgnoreCase))
- || (requestPort == 443 && string.Equals(request.Scheme, "https", StringComparison.OrdinalIgnoreCase)))
+ || (requestPort == 80 && string.Equals(request.Scheme, "http", StringComparison.OrdinalIgnoreCase))
+ || (requestPort == 443 && string.Equals(request.Scheme, "https", StringComparison.OrdinalIgnoreCase)))
{
requestPort = -1;
}
diff --git a/Emby.Server.Implementations/Net/SocketFactory.cs b/Emby.Server.Implementations/Net/SocketFactory.cs
index 02e45e689..e0c75698d 100644
--- a/Emby.Server.Implementations/Net/SocketFactory.cs
+++ b/Emby.Server.Implementations/Net/SocketFactory.cs
@@ -61,7 +61,7 @@ namespace Emby.Server.Implementations.Net
}
/// <inheritdoc />
- public ISocket CreateUdpMulticastSocket(IPAddress ipAddress, IPAddress bindIpAddress, int multicastTimeToLive, int localPort)
+ public ISocket CreateUdpMulticastSocket(IPAddress ipAddress, IPAddress? bindIpAddress, int multicastTimeToLive, int localPort)
{
ArgumentNullException.ThrowIfNull(ipAddress);
diff --git a/tests/Jellyfin.Server.Tests/ParseNetworkTests.cs b/tests/Jellyfin.Server.Tests/ParseNetworkTests.cs
index fc5f5f4c6..12a9beb9e 100644
--- a/tests/Jellyfin.Server.Tests/ParseNetworkTests.cs
+++ b/tests/Jellyfin.Server.Tests/ParseNetworkTests.cs
@@ -22,7 +22,7 @@ namespace Jellyfin.Server.Tests
true,
true,
new string[] { "192.168.t", "127.0.0.1", "::1", "1234.1232.12.1234" },
- new IPAddress[] { IPAddress.Loopback, },
+ new IPAddress[] { IPAddress.Loopback },
new IPNetwork[] { new IPNetwork(IPAddress.IPv6Loopback, 128) });
data.Add(