forked from OSchip/llvm-project
Include checksum in non-ack mode
Patch from Abid, Hafiz. llvm-svn: 188801
This commit is contained in:
parent
166b874696
commit
a6b4c77123
|
@ -159,12 +159,9 @@ GDBRemoteCommunication::CalculcateChecksum (const char *payload, size_t payload_
|
||||||
{
|
{
|
||||||
int checksum = 0;
|
int checksum = 0;
|
||||||
|
|
||||||
// We only need to compute the checksum if we are sending acks
|
for (size_t i = 0; i < payload_length; ++i)
|
||||||
if (GetSendAcks ())
|
checksum += payload[i];
|
||||||
{
|
|
||||||
for (size_t i = 0; i < payload_length; ++i)
|
|
||||||
checksum += payload[i];
|
|
||||||
}
|
|
||||||
return checksum & 255;
|
return checksum & 255;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue