Check that the network magic is correct

This commit is contained in:
simon.kagstrom 2009-11-08 09:34:00 +00:00
parent 4a183a000e
commit 1033f94d24

View File

@ -565,6 +565,10 @@ bool Network::ReceiveUpdate(NetworkUpdate *dst, size_t total_sz,
return false;
received += actual_sz;
if (ntohs(dst->magic) != FRODO_NETWORK_MAGIC) {
printf("Packet with wrong magic received\n");
return false;
}
if (this->ScanDataForStop(dst, received) == true)
break;