diff options
| author | Shadowghost <Ghost_of_Stone@web.de> | 2022-07-21 00:32:51 +0200 |
|---|---|---|
| committer | Shadowghost <Ghost_of_Stone@web.de> | 2022-07-21 00:32:51 +0200 |
| commit | 05458a4a4240d2b15db93de6c9ec25376677b5e1 (patch) | |
| tree | a47c803c9a85da584a5337c0a35dd7dd0c0da857 | |
| parent | 358642c2d9b0475cd7e4ed18e9507cc87c15935d (diff) | |
Fix some ssdp errors
| -rw-r--r-- | RSSDP/SsdpCommunicationsServer.cs | 6 | ||||
| -rw-r--r-- | RSSDP/SsdpDevicePublisher.cs | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/RSSDP/SsdpCommunicationsServer.cs b/RSSDP/SsdpCommunicationsServer.cs index 6e4f5634da..53f872b600 100644 --- a/RSSDP/SsdpCommunicationsServer.cs +++ b/RSSDP/SsdpCommunicationsServer.cs @@ -348,8 +348,6 @@ namespace Rssdp.Infrastructure { var sockets = new List<ISocket>(); - sockets.Add(_SocketFactory.CreateSsdpUdpSocket(IPAddress.Any, _LocalPort)); - if (_enableMultiSocketBinding) { foreach (var address in _networkManager.GetInternalBindAddresses()) @@ -370,6 +368,10 @@ namespace Rssdp.Infrastructure } } } + else + { + sockets.Add(_SocketFactory.CreateSsdpUdpSocket(IPAddress.Any, _LocalPort)); + } foreach (var socket in sockets) { diff --git a/RSSDP/SsdpDevicePublisher.cs b/RSSDP/SsdpDevicePublisher.cs index 37c4128ba4..adaac5fa38 100644 --- a/RSSDP/SsdpDevicePublisher.cs +++ b/RSSDP/SsdpDevicePublisher.cs @@ -298,9 +298,7 @@ namespace Rssdp.Infrastructure foreach (var device in deviceList) { var root = device.ToRootDevice(); - var source = new IPData(root.Address, new IPNetwork(root.Address, root.PrefixLength), root.FriendlyName); - var destination = new IPData(remoteEndPoint.Address, new IPNetwork(root.Address, root.PrefixLength)); - if (!_sendOnlyMatchedHost || source.Address.Equals(destination.Address)) + if (!_sendOnlyMatchedHost || root.Address.Equals(remoteEndPoint.Address)) { SendDeviceSearchResponses(device, remoteEndPoint, receivedOnlocalIpAddress, cancellationToken); } |
