kdcom: xor 1 to CurrentPacketId when we receive an ACK, not when we send one. Remove...
authorTimo Kreuzer <timo.kreuzer@reactos.org>
Tue, 27 Jan 2009 12:58:24 +0000 (12:58 +0000)
committerTimo Kreuzer <timo.kreuzer@reactos.org>
Tue, 27 Jan 2009 12:58:24 +0000 (12:58 +0000)
svn path=/branches/ros-amd64-bringup/; revision=39133

reactos/drivers/base/kdcom/i386/kdbg.c

index 437652d..f81bcc6 100644 (file)
@@ -814,12 +814,6 @@ KdSendPacket(
                                                     MessageData->Length);
         }
 
                                                     MessageData->Length);
         }
 
-        // FIXME: this looks wrong, but makes dbgprints work
-        if (PacketType == PACKET_TYPE_KD_DEBUG_IO)
-        {
-            CurrentPacketId |= SYNC_PACKET_ID;
-        }
-
         /* Set the packet id */
         Packet.PacketId = CurrentPacketId;
 
         /* Set the packet id */
         Packet.PacketId = CurrentPacketId;
 
@@ -967,6 +961,7 @@ KdReceivePacket(
                     if (PacketType == PACKET_TYPE_KD_ACKNOWLEDGE)
                     {
                         /* Remote acknowledges the last packet */
                     if (PacketType == PACKET_TYPE_KD_ACKNOWLEDGE)
                     {
                         /* Remote acknowledges the last packet */
+                        CurrentPacketId ^= 1;
                         return KdPacketReceived;
                     }
                     /* That's not what we were waiting for, start over. */
                         return KdPacketReceived;
                     }
                     /* That's not what we were waiting for, start over. */
@@ -1091,7 +1086,6 @@ KdReceivePacket(
 
         /* Acknowledge the received packet */
         KdpSendControlPacket(PACKET_TYPE_KD_ACKNOWLEDGE, Packet.PacketId);
 
         /* Acknowledge the received packet */
         KdpSendControlPacket(PACKET_TYPE_KD_ACKNOWLEDGE, Packet.PacketId);
-        CurrentPacketId ^= 1;
 
 //FrLdrDbgPrint("KdReceivePacket - all ok\n");
 
 
 //FrLdrDbgPrint("KdReceivePacket - all ok\n");