From: Steinar H. Gunderson Date: Sun, 18 Aug 2013 00:54:54 +0000 (+0200) Subject: Compute the checksum on outgoing Metacube packets as well. X-Git-Tag: 1.0.0~7 X-Git-Url: https://git.sesse.net/?p=cubemap;a=commitdiff_plain;h=e05f9f880fb97c3510546a60d57b5da0b0752591;ds=sidebyside Compute the checksum on outgoing Metacube packets as well. --- diff --git a/stream.cpp b/stream.cpp index e88ad77..42edee9 100644 --- a/stream.cpp +++ b/stream.cpp @@ -226,6 +226,7 @@ void Stream::add_data_deferred(const char *data, size_t bytes, StreamStartSuitab if (suitable_for_stream_start == NOT_SUITABLE_FOR_STREAM_START) { hdr.flags |= htons(METACUBE_FLAGS_NOT_SUITABLE_FOR_STREAM_START); } + hdr.csum = htons(metacube2_compute_crc(&hdr)); iovec iov; iov.iov_base = new char[bytes + sizeof(hdr)];