diff options
| author | Jim Cartlidge <jimcartlidge@yahoo.co.uk> | 2020-09-12 16:41:37 +0100 |
|---|---|---|
| committer | Jim Cartlidge <jimcartlidge@yahoo.co.uk> | 2020-09-12 16:41:37 +0100 |
| commit | 9ef79d190b2490a03c566bfaaf963fbba7d124a9 (patch) | |
| tree | 4426461a89f2c2610521bf53c808e01d0e8e3db2 /RSSDP/SsdpDevicePublisher.cs | |
| parent | 6bf0acb854683377bebad3ca27de17706519c420 (diff) | |
Large number of files
Diffstat (limited to 'RSSDP/SsdpDevicePublisher.cs')
| -rw-r--r-- | RSSDP/SsdpDevicePublisher.cs | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/RSSDP/SsdpDevicePublisher.cs b/RSSDP/SsdpDevicePublisher.cs index 1a8577d8d..43fccdad4 100644 --- a/RSSDP/SsdpDevicePublisher.cs +++ b/RSSDP/SsdpDevicePublisher.cs @@ -5,7 +5,9 @@ using System.Linq; using System.Net; using System.Threading; using System.Threading.Tasks; +using Jellyfin.Networking.Manager; using MediaBrowser.Common.Net; +using NetworkCollection; namespace Rssdp.Infrastructure { @@ -300,17 +302,14 @@ namespace Rssdp.Infrastructure foreach (var device in deviceList) { - if (!_sendOnlyMatchedHost || - _networkManager.IsInSameSubnet(device.ToRootDevice().Address, remoteEndPoint.Address, device.ToRootDevice().SubnetMask)) + var ip1 = new IPNetAddress(device.ToRootDevice().Address, device.ToRootDevice().SubnetMask); + var ip2 = new IPNetAddress(remoteEndPoint.Address, device.ToRootDevice().SubnetMask); + if (!_sendOnlyMatchedHost || ip1.NetworkAddress.Equals(ip2.NetworkAddress)) { SendDeviceSearchResponses(device, remoteEndPoint, receivedOnlocalIpAddress, cancellationToken); } } } - else - { - // WriteTrace(String.Format("Sending 0 search responses.")); - } }); } |
