diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2018-01-14 00:49:46 +0100 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2018-01-14 00:49:46 +0100 |
commit | 2512b8f732e1c55b7ebffbd307153af40b5e34f4 (patch) | |
tree | 2654c5a3613fc41de8bd49891f53fcd149e84a3c /src/zmq2edi/EDISender.cpp | |
parent | 1ec8092d2a821d254c4b9465aeaabc6ce5259a7d (diff) | |
download | dabmux-2512b8f732e1c55b7ebffbd307153af40b5e34f4.tar.gz dabmux-2512b8f732e1c55b7ebffbd307153af40b5e34f4.tar.bz2 dabmux-2512b8f732e1c55b7ebffbd307153af40b5e34f4.zip |
Verify ETI frame size in EDISender
Diffstat (limited to 'src/zmq2edi/EDISender.cpp')
-rw-r--r-- | src/zmq2edi/EDISender.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
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(); |