Let it work if the nic has been replaced

This commit is contained in:
Tim Young 2018-04-05 16:40:42 +03:00
parent 88ec8a6cf5
commit 7707ddc0e1
2 changed files with 23 additions and 17 deletions

View File

@ -543,6 +543,7 @@ namespace EduNetworkBuilder
case NetTestType.DeviceIsFrozen:
case NetTestType.DeviceBlowsUpWithPower:
case NetTestType.DeviceNeedsUPS:
case NetTestType.DeviceNICSprays:
return TaskWasDone; //This variable will tell us if these tests have been done.
case NetTestType.DHCPServerEnabled:
if (Source == null) return false; //Unable to do it. Do not count it against them.

View File

@ -480,15 +480,18 @@ namespace EduNetworkBuilder
if (myNet.ItemHasTest(WhereFrom.hostname, NicName(), NetTestType.DeviceNICSprays))
{
if (tPacket.MyType == PacketType.bad_packet) return false;
//We should drop the current packet.
tPacket.AddMessage(DebugLevel.info, NB.Translate("N_ProssShouldContinTime"));
tPacket.Tracking.Status = NB.Translate("N_ProssShouldContinTime");
tPacket.MyStatus = PacketStatus.finished_failed;
//Then, we make a bad packet go out from here
WhereFrom.BadSprayCount = NB.NumBadPackets;
WhereFrom.BadPacketFromHere();
return false;
if (!myNet.ItemTestIsComplete(WhereFrom.hostname, NicName(), NetTestType.DeviceNICSprays))
{
if (tPacket.MyType == PacketType.bad_packet) return false;
//We should drop the current packet.
tPacket.AddMessage(DebugLevel.info, NB.Translate("N_ProssShouldContinTime"));
tPacket.Tracking.Status = NB.Translate("N_ProssShouldContinTime");
tPacket.MyStatus = PacketStatus.finished_failed;
//Then, we make a bad packet go out from here
WhereFrom.BadSprayCount = NB.NumBadPackets;
WhereFrom.BadPacketFromHere();
return false;
}
}
@ -768,14 +771,16 @@ namespace EduNetworkBuilder
if (mynet.ItemHasTest(nd.hostname, NicName(), NetTestType.DeviceNICSprays))
{
//We should drop the current packet.
tPacket.AddMessage(DebugLevel.info, NB.Translate("N_ProssShouldContinTime"));
tPacket.Tracking.Status = NB.Translate("N_ProssShouldContinTime");
tPacket.MyStatus = PacketStatus.finished_failed;
//Then, we make a bad packet go out from here
nd.BadPacketFromHere();
nd.BadSprayCount = NB.NumBadPackets;
if (!mynet.ItemTestIsComplete(nd.hostname, NicName(), NetTestType.DeviceNICSprays))
{
//We should drop the current packet.
tPacket.AddMessage(DebugLevel.info, NB.Translate("N_ProssShouldContinTime"));
tPacket.Tracking.Status = NB.Translate("N_ProssShouldContinTime");
tPacket.MyStatus = PacketStatus.finished_failed;
//Then, we make a bad packet go out from here
nd.BadPacketFromHere();
nd.BadSprayCount = NB.NumBadPackets;
}
}
if (mynet.ItemHasTest(nd.hostname,NetTestType.DeviceIsFrozen))
{