]> git.sesse.net Git - cubemap/commitdiff
Compute the checksum on outgoing Metacube packets as well.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 18 Aug 2013 00:54:54 +0000 (02:54 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 18 Aug 2013 00:54:54 +0000 (02:54 +0200)
stream.cpp

index e88ad779648e7639fd35a2926476eb446075cb1c..42edee95aae01176e94c3a63ab47704a95b19a36 100644 (file)
@@ -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);
                }
                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)];
 
                iovec iov;
                iov.iov_base = new char[bytes + sizeof(hdr)];