Author: tkreuzer Date: Mon Oct 26 13:51:26 2009 New Revision: 43779
URL: http://svn.reactos.org/svn/reactos?rev=43779&view=rev Log: [KDCOM] - In case of failing to receive a part of the packet, return the status to the caller instead of continuing.
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/driver... ============================================================================== --- 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] Mon Oct 26 13:51:26 2009 @@ -149,8 +149,8 @@ KdStatus = KdpReceiveBuffer(&Packet.PacketType, sizeof(USHORT)); if (KdStatus != KDP_PACKET_RECEIVED) { - /* Didn't receive a PacketType or PacketType is bad. Start over. */ - continue; + /* Didn't receive a PacketType. */ + return KdStatus; }
/* Check if we got a resend packet */ @@ -164,16 +164,16 @@ KdStatus = KdpReceiveBuffer(&Packet.ByteCount, sizeof(USHORT)); if (KdStatus != KDP_PACKET_RECEIVED) { - /* Didn't receive ByteCount or it's too big. Start over. */ - continue; + /* Didn't receive ByteCount. */ + return KdStatus; }
/* Step 4 - Read PacketId */ KdStatus = KdpReceiveBuffer(&Packet.PacketId, sizeof(ULONG)); if (KdStatus != KDP_PACKET_RECEIVED) { - /* Didn't receive PacketId. Start over. */ - continue; + /* Didn't receive PacketId. */ + return KdStatus; }
/* @@ -188,8 +188,8 @@ KdStatus = KdpReceiveBuffer(&Packet.Checksum, sizeof(ULONG)); if (KdStatus != KDP_PACKET_RECEIVED) { - /* Didn't receive Checksum. Start over. */ - continue; + /* Didn't receive Checksum. */ + return KdStatus; }
/* Step 6 - Handle control packets */ @@ -421,6 +421,7 @@ }
/* Packet timed out, send it again */ + KDDBGPRINT("KdSendPacket got KdStatus 0x%x\n", KdStatus); } while (Retries > 0); }