- Check the PacketType only after the whole message was received and just skip the message and restart when it's not what we wanted.

svn path=/branches/ros-amd64-bringup/; revision=43738
This commit is contained in:
Timo Kreuzer
2009-10-25 11:37:17 +00:00
parent 3e678b588b
commit 1987b47110
+9 -9
View File
@@ -227,15 +227,6 @@ KdReceivePacket(
return KDP_PACKET_RECEIVED;
}
/* Did we get the right packet type? */
if (PacketType != Packet.PacketType)
{
/* We received something different, start over */
KDDBGPRINT("KdReceivePacket - wrong PacketType\n");
KdpSendControlPacket(PACKET_TYPE_KD_RESEND, 0);
continue;
}
/* Get size of the message header */
switch (Packet.PacketType)
{
@@ -334,6 +325,15 @@ KdReceivePacket(
continue;
}
/* Did we get the right packet type? */
if (PacketType != Packet.PacketType)
{
/* We received something different, ignore it. */
KDDBGPRINT("KdReceivePacket - wrong PacketType\n");
KdpSendControlPacket(PACKET_TYPE_KD_ACKNOWLEDGE, Packet.PacketId);
continue;
}
/* Acknowledge the received packet */
KdpSendControlPacket(PACKET_TYPE_KD_ACKNOWLEDGE, Packet.PacketId);