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

@ -434,7 +434,8 @@ void DetectorImpl::readFrameFromReceiver() {
numInterfaces = Parallel(&Module::getNumberofUDPInterfacesFromShm, {})
.squash(); // cannot pick up from zmq
}
bool runningList[zmqSocket.size()], connectList[zmqSocket.size()];
std::vector<bool> runningList(zmqSocket.size());
std::vector<bool> connectList(zmqSocket.size());
int numRunning = 0;
for (size_t i = 0; i < zmqSocket.size(); ++i) {
if (zmqSocket[i]->Connect() == 0) {