Fixed selection of correct interface ip

This commit is contained in:
BaronGreenback
2021-03-14 17:30:25 +00:00
parent b1f0c5eb49
commit 6087831aa6
2 changed files with 22 additions and 11 deletions

View File

@@ -27,7 +27,7 @@ namespace MediaBrowser.Common.Net
/// </summary>
/// <param name="source">The <see cref="Collection{IPObject}"/>.</param>
/// <param name="item">Item to add.</param>
/// <param name="itemsAreNetworks">If <c>true</c> the values are treated as subnets.
/// <param name="itemsAreNetworks">If <c>true</c> the values are treated as subnets.
/// If <b>false</b> items are addresses.</param>
public static void AddItem(this Collection<IPObject> source, IPObject item, bool itemsAreNetworks = true)
{
@@ -192,8 +192,9 @@ namespace MediaBrowser.Common.Net
/// </summary>
/// <param name="source">The <see cref="Collection{IPObject}"/>.</param>
/// <param name="excludeList">Items to exclude.</param>
/// <param name="isNetwork">Collection is a network collection.</param>
/// <returns>A new collection, with the items excluded.</returns>
public static Collection<IPObject> Exclude(this Collection<IPObject> source, Collection<IPObject> excludeList)
public static Collection<IPObject> Exclude(this Collection<IPObject> source, Collection<IPObject> excludeList, bool isNetwork)
{
if (source.Count == 0 || excludeList == null)
{
@@ -218,7 +219,7 @@ namespace MediaBrowser.Common.Net
if (!found)
{
results.AddItem(outer);
results.AddItem(outer, isNetwork);
}
}