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.DeviceIsFrozen:
case NetTestType.DeviceBlowsUpWithPower: case NetTestType.DeviceBlowsUpWithPower:
case NetTestType.DeviceNeedsUPS: case NetTestType.DeviceNeedsUPS:
case NetTestType.DeviceNICSprays:
return TaskWasDone; //This variable will tell us if these tests have been done. return TaskWasDone; //This variable will tell us if these tests have been done.
case NetTestType.DHCPServerEnabled: case NetTestType.DHCPServerEnabled:
if (Source == null) return false; //Unable to do it. Do not count it against them. 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 (myNet.ItemHasTest(WhereFrom.hostname, NicName(), NetTestType.DeviceNICSprays))
{ {
if (tPacket.MyType == PacketType.bad_packet) return false; if (!myNet.ItemTestIsComplete(WhereFrom.hostname, NicName(), NetTestType.DeviceNICSprays))
//We should drop the current packet. {
tPacket.AddMessage(DebugLevel.info, NB.Translate("N_ProssShouldContinTime")); if (tPacket.MyType == PacketType.bad_packet) return false;
tPacket.Tracking.Status = NB.Translate("N_ProssShouldContinTime"); //We should drop the current packet.
tPacket.MyStatus = PacketStatus.finished_failed; tPacket.AddMessage(DebugLevel.info, NB.Translate("N_ProssShouldContinTime"));
//Then, we make a bad packet go out from here tPacket.Tracking.Status = NB.Translate("N_ProssShouldContinTime");
WhereFrom.BadSprayCount = NB.NumBadPackets; tPacket.MyStatus = PacketStatus.finished_failed;
WhereFrom.BadPacketFromHere(); //Then, we make a bad packet go out from here
return false; WhereFrom.BadSprayCount = NB.NumBadPackets;
WhereFrom.BadPacketFromHere();
return false;
}
} }
@ -768,14 +771,16 @@ namespace EduNetworkBuilder
if (mynet.ItemHasTest(nd.hostname, NicName(), NetTestType.DeviceNICSprays)) if (mynet.ItemHasTest(nd.hostname, NicName(), NetTestType.DeviceNICSprays))
{ {
//We should drop the current packet. if (!mynet.ItemTestIsComplete(nd.hostname, NicName(), NetTestType.DeviceNICSprays))
tPacket.AddMessage(DebugLevel.info, NB.Translate("N_ProssShouldContinTime")); {
tPacket.Tracking.Status = NB.Translate("N_ProssShouldContinTime"); //We should drop the current packet.
tPacket.MyStatus = PacketStatus.finished_failed; tPacket.AddMessage(DebugLevel.info, NB.Translate("N_ProssShouldContinTime"));
//Then, we make a bad packet go out from here tPacket.Tracking.Status = NB.Translate("N_ProssShouldContinTime");
nd.BadPacketFromHere(); tPacket.MyStatus = PacketStatus.finished_failed;
nd.BadSprayCount = NB.NumBadPackets; //Then, we make a bad packet go out from here
nd.BadPacketFromHere();
nd.BadSprayCount = NB.NumBadPackets;
}
} }
if (mynet.ItemHasTest(nd.hostname,NetTestType.DeviceIsFrozen)) if (mynet.ItemHasTest(nd.hostname,NetTestType.DeviceIsFrozen))
{ {