X-Git-Url: https://git.sesse.net/?p=cubemap;a=blobdiff_plain;f=server.cpp;h=4442b34cee7899661bae68e15e1ed223018abdc2;hp=1637d94fc068ff4f56acc0f099aad0ed60221772;hb=979a284b4039b0ea74525b700b9f1089b8c4248d;hpb=70c0baf4bcec3a77f0626d5a7bfde87fc7339698 diff --git a/server.cpp b/server.cpp index 1637d94..4442b34 100644 --- a/server.cpp +++ b/server.cpp @@ -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(&hdr), sizeof(hdr))); }