update dlna interface binding

This commit is contained in:
Luke Pulverenti
2015-12-25 22:36:38 -05:00
parent 0ffc5ebace
commit 40c46ca649
6 changed files with 18 additions and 13 deletions

View File

@@ -226,16 +226,13 @@ namespace MediaBrowser.Common.Implementations.Networking
try
{
Logger.Debug("Found interface: {0}. Type: {1}. Status: {2}", network.Name, network.NetworkInterfaceType, network.OperationalStatus);
Logger.Debug("Querying interface: {0}. Type: {1}. Status: {2}", network.Name, network.NetworkInterfaceType, network.OperationalStatus);
var properties = network.GetIPProperties();
var ipV4 = properties.GetIPv4Properties();
if (null == ipV4)
return new List<IPAddress>();
return properties.UnicastAddresses
.Where(i => i.Address.AddressFamily == AddressFamily.InterNetwork && !IPAddress.IsLoopback(i.Address))
.Select(i => i.Address)
.Select(i => i.Address)
.Where(i => i.AddressFamily == AddressFamily.InterNetwork && !IPAddress.IsLoopback(i))
.ToList();
}
catch (Exception ex)