From 2512b8f732e1c55b7ebffbd307153af40b5e34f4 Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Sun, 14 Jan 2018 00:49:46 +0100 Subject: Verify ETI frame size in EDISender --- src/zmq2edi/EDISender.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/zmq2edi') diff --git a/src/zmq2edi/EDISender.cpp b/src/zmq2edi/EDISender.cpp index 126131b..ec76e02 100644 --- a/src/zmq2edi/EDISender.cpp +++ b/src/zmq2edi/EDISender.cpp @@ -325,11 +325,18 @@ void EDISender::process() frame_t frame; frames.wait_and_pop(frame); - if (not running.load()) { + if (not running.load() or frame.first.empty()) { break; } - send_eti_frame(frame.first.data(), frame.second); + if (frame.first.size() == 6144) { + send_eti_frame(frame.first.data(), frame.second); + } + else { + etiLog.level(warn) << "Ignoring short ETI frame, " + "DFLC=" << frame.second.dlfc << ", len=" << + frame.first.size(); + } if (wait_times.size() == 250) { // every six seconds const double n = wait_times.size(); -- cgit v1.2.3