From ddf43dbd24b19002be3633e8fb43e0368a637499 Mon Sep 17 00:00:00 2001 From: Dhanya Thattil Date: Tue, 17 Nov 2020 16:12:30 +0100 Subject: [PATCH] fix for Eiger firmware sending bad packets of size 8 bytes when doing a stop --- slsSupportLib/src/UdpRxSocket.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/slsSupportLib/src/UdpRxSocket.cpp b/slsSupportLib/src/UdpRxSocket.cpp index 0d9d3c694..90ebf284d 100644 --- a/slsSupportLib/src/UdpRxSocket.cpp +++ b/slsSupportLib/src/UdpRxSocket.cpp @@ -70,6 +70,12 @@ ssize_t UdpRxSocket::ReceiveDataOnly(char *dst) noexcept { LOG(logWARNING) << "Got header pkg"; r = recvfrom(sockfd_, dst, packet_size_, 0, nullptr, nullptr); } + // temporary workaround for Eiger firmware (stop sends bad packets of size 8 + // bytes) + if (r == 8) { + LOG(logWARNING) << "Ignoring bad packet of size 8 bytes"; + r = recvfrom(sockfd_, dst, packet_size_, 0, nullptr, nullptr); + } return r; }