]> git.sesse.net Git - cubemap/blobdiff - server.cpp
Tweak the MutexLock implementation slightly, so as to confuse Coverity less.
[cubemap] / server.cpp
index 1637d94fc068ff4f56acc0f099aad0ed60221772..4442b34cee7899661bae68e15e1ed223018abdc2 100644 (file)
@@ -20,7 +20,7 @@
 #include "accesslog.h"
 #include "log.h"
 #include "markpool.h"
-#include "metacube.h"
+#include "metacube2.h"
 #include "mutexlock.h"
 #include "parse.h"
 #include "server.h"
@@ -542,10 +542,11 @@ void Server::construct_header(Client *client)
                        "Content-encoding: metacube\r\n" +
                        "\r\n";
                if (!stream->stream_header.empty()) {
-                       metacube_block_header hdr;
-                       memcpy(hdr.sync, METACUBE_SYNC, sizeof(hdr.sync));
+                       metacube2_block_header hdr;
+                       memcpy(hdr.sync, METACUBE2_SYNC, sizeof(hdr.sync));
                        hdr.size = htonl(stream->stream_header.size());
-                       hdr.flags = htonl(METACUBE_FLAGS_HEADER);
+                       hdr.flags = htons(METACUBE_FLAGS_HEADER);
+                       hdr.csum = htons(metacube2_compute_crc(&hdr));
                        client->header_or_error.append(
                                string(reinterpret_cast<char *>(&hdr), sizeof(hdr)));
                }