Remove VLAs (#124)

Removing the use of VLAs in the client and receiver side code. In addition cleaning up sending jsonheader
This commit is contained in:
Erik Fröjdh
2020-07-30 18:22:39 +02:00
committed by GitHub
parent 87c33c8e81
commit 1177e54602
6 changed files with 74 additions and 84 deletions

View File

@ -51,9 +51,12 @@ class BinaryFile : private virtual slsDetectorDefs, public File {
private:
int WriteData(char *buf, int bsize);
FILE *filefd;
FILE *filefd = nullptr;
static FILE *masterfd;
uint32_t numFramesInFile;
uint64_t numActualPacketsInFile;
const size_t maxMasterFileSize;
};
uint32_t numFramesInFile = 0;
uint64_t numActualPacketsInFile = 0;
//Make sure this is known at compile time
//TODO! Later away from stack allocation of message
static constexpr size_t maxMasterFileSize = 2000;
};