diff options
| author | Anthony Lavado <anthony@lavado.ca> | 2020-06-20 17:39:00 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-06-20 17:39:00 -0400 |
| commit | 3a5df3d06000a209e308f21cebf9aeb4c3fa9a5b (patch) | |
| tree | be1fbaf44475fc5aa21df24ac8e5f3cf05abc7c9 /RSSDP | |
| parent | bb947718eaee3a8381d9b9e6ed926676de39d7c9 (diff) | |
| parent | 43221fc26b46ac8d55b8bac7cec859dc8ec3883b (diff) | |
Merge pull request #3007 from BaronGreenback/SSDP
Fix for #2986
Diffstat (limited to 'RSSDP')
| -rw-r--r-- | RSSDP/SsdpCommunicationsServer.cs | 12 | ||||
| -rw-r--r-- | RSSDP/SsdpDeviceLocator.cs | 2 |
2 files changed, 6 insertions, 8 deletions
diff --git a/RSSDP/SsdpCommunicationsServer.cs b/RSSDP/SsdpCommunicationsServer.cs index e4c4a2017..8fde700e0 100644 --- a/RSSDP/SsdpCommunicationsServer.cs +++ b/RSSDP/SsdpCommunicationsServer.cs @@ -8,7 +8,6 @@ using System.Text; using System.Threading; using System.Threading.Tasks; using MediaBrowser.Common.Net; -using MediaBrowser.Controller.Configuration; using MediaBrowser.Model.Net; using Microsoft.Extensions.Logging; @@ -43,8 +42,7 @@ namespace Rssdp.Infrastructure private HttpResponseParser _ResponseParser; private readonly ILogger _logger; private ISocketFactory _SocketFactory; - private readonly INetworkManager _networkManager; - private readonly IServerConfigurationManager _config; + private readonly INetworkManager _networkManager; private int _LocalPort; private int _MulticastTtl; @@ -66,11 +64,11 @@ namespace Rssdp.Infrastructure /// Minimum constructor. /// </summary> /// <exception cref="ArgumentNullException">The <paramref name="socketFactory"/> argument is null.</exception> - public SsdpCommunicationsServer(IServerConfigurationManager config, ISocketFactory socketFactory, + public SsdpCommunicationsServer(ISocketFactory socketFactory, INetworkManager networkManager, ILogger logger, bool enableMultiSocketBinding) : this(socketFactory, 0, SsdpConstants.SsdpDefaultMulticastTimeToLive, networkManager, logger, enableMultiSocketBinding) { - _config = config; + } /// <summary> @@ -355,13 +353,13 @@ namespace Rssdp.Infrastructure if (_enableMultiSocketBinding) { - foreach (var address in _networkManager.GetLocalIpAddresses(_config.Configuration.IgnoreVirtualInterfaces)) + foreach (var address in _networkManager.GetLocalIpAddresses()) { if (address.AddressFamily == AddressFamily.InterNetworkV6) { // Not support IPv6 right now continue; - } + } try { diff --git a/RSSDP/SsdpDeviceLocator.cs b/RSSDP/SsdpDeviceLocator.cs index 38562ce49..bfad6de97 100644 --- a/RSSDP/SsdpDeviceLocator.cs +++ b/RSSDP/SsdpDeviceLocator.cs @@ -353,7 +353,7 @@ namespace Rssdp.Infrastructure { return; } - + var location = GetFirstHeaderUriValue("Location", message); if (location != null) { |
