#include "accesslog.h"
#include "log.h"
#include "markpool.h"
-#include "metacube.h"
+#include "metacube2.h"
#include "mutexlock.h"
#include "parse.h"
#include "server.h"
"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)));
}