Get broken device replacement working

This commit is contained in:
Tim Young 2018-02-13 18:03:01 +00:00
parent 0df4b14e01
commit faf8ed1984
3 changed files with 17 additions and 1 deletions

View File

@ -226,6 +226,10 @@ namespace EduNetworkBuilder
{
cbDest.Items.Add(NB.Translate("_All"));
}
else if (ToEdit.TheTest == NetTestType.DeviceIsBad)
{
cbDest.Items.Add(ToEdit.sHost);
}
else if (ToEdit.TheTest == NetTestType.LockDHCP)
{
//return all the dhcp ranges

View File

@ -730,6 +730,17 @@ namespace EduNetworkBuilder
mynet = NB.GetNetwork();
nd = mynet.GetDeviceFromID(myID);
if(mynet.ItemHasTest(nd.hostname,NetTestType.DeviceIsBad))
{
if(!mynet.ItemTestIsComplete(nd.hostname, NetTestType.DeviceIsBad))
{
//the device is busted and nonfunctional. No response.
tPacket.AddMessage(DebugLevel.info, "");
tPacket.Tracking.Status = "";
tPacket.MyStatus = PacketStatus.finished_failed;
}
}
if (tPacket == null) return;
tPacket.InboundNic = this; //track which nic we came in on.
if (myNicType == NicType.port || myNicType == NicType.wport || (nd.IsWirelessForwarder() && (myNicType == NicType.wlan ||

View File

@ -2878,7 +2878,8 @@ namespace EduNetworkBuilder
DefaultGW = new IPAddress(NB.ZeroIPString);
foreach(NetworkCard nic in NICs)
{
nic.ClearIPs();
if(nic.GetNicType != NicType.port)
nic.ClearIPs();
}
}