wrepeater changes

This commit is contained in:
Tim Young 2015-09-01 16:27:17 -05:00
parent 259d68d72b
commit 570d4b3c91
3 changed files with 21 additions and 13 deletions

View File

@ -177,9 +177,9 @@ namespace EduNetworkBuilder
break; break;
} }
} }
DoAllVerifyLinks();
DoAllAutoJoin();
} }
DoAllVerifyLinks();
DoAllAutoJoin();
if (NetMessage.GetText() != "" && !AlreadyDisplayedMessage) if (NetMessage.GetText() != "" && !AlreadyDisplayedMessage)
{ {
//We have a message loaded on this network. Display it //We have a message loaded on this network. Display it
@ -429,7 +429,12 @@ namespace EduNetworkBuilder
public void RemoveComponent(NetworkComponent tItem) public void RemoveComponent(NetworkComponent tItem)
{ {
NetComponents.Remove(tItem); for (int i = NetComponents.Count -1; i >= 0; i--)
{
if (NetComponents[i] == tItem)
NetComponents.RemoveAt(i);
// NetComponents.Remove(tItem);
}
tItem.Destroy(); tItem.Destroy();
_isDirty = true; _isDirty = true;
} }

View File

@ -95,8 +95,8 @@ namespace EduNetworkBuilder
NICs.Clear(); NICs.Clear();
tnic = new NetworkCard(0, GetUniqueIdentifier, hostname, NicType.lo); tnic = new NetworkCard(0, GetUniqueIdentifier, hostname, NicType.lo);
NICs.Add(tnic); NICs.Add(tnic);
tnic = new NetworkCard(0, GetUniqueIdentifier, hostname, NicType.management_interface); //tnic = new NetworkCard(0, GetUniqueIdentifier, hostname, NicType.management_interface);
NICs.Add(tnic); //NICs.Add(tnic); --we use the wlan interface
tnic = new NetworkCard(NICs.Count(), GetUniqueIdentifier, hostname, NicType.wlan); //Add a wireless nic tnic = new NetworkCard(NICs.Count(), GetUniqueIdentifier, hostname, NicType.wlan); //Add a wireless nic
NICs.Add(tnic); NICs.Add(tnic);
tnic = new NetworkCard(NICs.Count(), GetUniqueIdentifier, hostname, NicType.wport); //Add a wireless port tnic = new NetworkCard(NICs.Count(), GetUniqueIdentifier, hostname, NicType.wport); //Add a wireless port

View File

@ -367,16 +367,19 @@ namespace EduNetworkBuilder
Tracking.Status = "Packet failed to reach IP: " + destIP.GetIPString; Tracking.Status = "Packet failed to reach IP: " + destIP.GetIPString;
MyStatus = PacketStatus.finished_failed; MyStatus = PacketStatus.finished_failed;
} }
if(MyType == PacketType.ping_answer && MyStatus == PacketStatus.finished_failed)
{
myNet.NoteActionDone(NetTestType.FailedPing, destIP.GetIPString, sourceIP.GetIPString);
}
if (MyType == PacketType.ping_request && MyStatus == PacketStatus.finished_failed)
{
myNet.NoteActionDone(NetTestType.FailedPing, sourceIP.GetIPString, destIP.GetIPString);
}
if (MyStatus != PacketStatus.finished) if (MyStatus != PacketStatus.finished)
myNet.AddMessage(Tracking); //We only store finished_failed, and finished_ok myNet.AddMessage(Tracking); //We only store finished_failed, and finished_ok
if (sourceIP != null && destIP != null)
{
if (MyType == PacketType.ping_answer && MyStatus == PacketStatus.finished_failed)
{
myNet.NoteActionDone(NetTestType.FailedPing, destIP.GetIPString, sourceIP.GetIPString);
}
if (MyType == PacketType.ping_request && MyStatus == PacketStatus.finished_failed)
{
myNet.NoteActionDone(NetTestType.FailedPing, sourceIP.GetIPString, destIP.GetIPString);
}
}
} }
} }