X-Git-Url: https://git.sesse.net/?p=cubemap;a=blobdiff_plain;f=stream.cpp;h=83257e9046d3a9cbbd29756f100bedaed069df45;hp=109d2fd4a90116398e8b638816872cabf06b22ce;hb=162161d07d8db58b69e74847e71012c775c4ecca;hpb=534764f026b82b144e974882c8e53c4cd8d21b68 diff --git a/stream.cpp b/stream.cpp index 109d2fd..83257e9 100644 --- a/stream.cpp +++ b/stream.cpp @@ -1,14 +1,15 @@ -#include +#include #include -#include +#include #include +#include #include #include #include -#include "state.pb.h" #include "log.h" #include "metacube.h" +#include "state.pb.h" #include "stream.h" #include "util.h" @@ -109,6 +110,9 @@ void Stream::set_backlog_size(size_t new_size) // Create a new, empty data file. data_fd = make_tempfile(""); + if (data_fd == -1) { + exit(1); + } backlog_size = new_size; // Now cheat a bit by rewinding, and adding all the old data back.