aboutsummaryrefslogtreecommitdiff
path: root/RSSDP/SsdpDevicePublisher.cs
diff options
context:
space:
mode:
authorJim Cartlidge <jimcartlidge@yahoo.co.uk>2020-10-04 09:56:33 +0100
committerJim Cartlidge <jimcartlidge@yahoo.co.uk>2020-10-04 09:56:33 +0100
commit53af1e34553917d00e17465f345ea530f04beddf (patch)
treec9ec4bbd1536da705263c71075d48bb9f226a9c7 /RSSDP/SsdpDevicePublisher.cs
parent3b64171cde969a7cfca60d28c7782774a173758b (diff)
Updatig netcollection & re-inserting BOM
Diffstat (limited to 'RSSDP/SsdpDevicePublisher.cs')
-rw-r--r--RSSDP/SsdpDevicePublisher.cs7
1 files changed, 4 insertions, 3 deletions
diff --git a/RSSDP/SsdpDevicePublisher.cs b/RSSDP/SsdpDevicePublisher.cs
index c70294b38..ca382c905 100644
--- a/RSSDP/SsdpDevicePublisher.cs
+++ b/RSSDP/SsdpDevicePublisher.cs
@@ -301,9 +301,10 @@ namespace Rssdp.Infrastructure
foreach (var device in deviceList)
{
- 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))
+ var root = device.ToRootDevice();
+ var source = new IPNetAddress(root.Address, root.SubnetMask);
+ var destination = new IPNetAddress(remoteEndPoint.Address, root.SubnetMask);
+ if (!_sendOnlyMatchedHost || source.NetworkAddress.Equals(destination.NetworkAddress))
{
SendDeviceSearchResponses(device, remoteEndPoint, receivedOnlocalIpAddress, cancellationToken);
}