Author: tkreuzer
Date: Sun Oct 25 12:37:17 2009
New Revision: 43738
URL: http://svn.reactos.org/svn/reactos?rev=43738&view=rev
Log:
[KDCOM]
- Check the PacketType only after the whole message was received and just skip the message and restart when it's not what we wanted.
Modified:
branches/ros-amd64-bringup/reactos/drivers/base/kddll/kddll.c
Modified: branches/ros-amd64-bringup/reactos/drivers/base/kddll/kddll.c
URL: http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/drive…
==============================================================================
--- branches/ros-amd64-bringup/reactos/drivers/base/kddll/kddll.c [iso-8859-1] (original)
+++ branches/ros-amd64-bringup/reactos/drivers/base/kddll/kddll.c [iso-8859-1] Sun Oct 25 12:37:17 2009
@@ -227,15 +227,6 @@
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 @@
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);