diff --git a/Appl/CEP/CS1/CS1_InputSection/src/InputThread.cc b/Appl/CEP/CS1/CS1_InputSection/src/InputThread.cc index 1c897ea8ace42e9d7497e38ddc79eda23c55e0f7..9b1a6477df5de10018195c04831e2c23afa16839 100644 --- a/Appl/CEP/CS1/CS1_InputSection/src/InputThread.cc +++ b/Appl/CEP/CS1/CS1_InputSection/src/InputThread.cc @@ -27,6 +27,7 @@ #include <Common/LofarLogger.h> #include <Common/hexdump.h> #include <CS1_InputSection/InputThread.h> +#include <Common/DataConvert.h> #include <Common/Timer.h> #include <Transport/TransportHolder.h> #include <Transport/TH_MPI.h> @@ -112,6 +113,11 @@ retry: // until valid packet received unsigned seqid = * ((unsigned *) &recvframe[8]); unsigned blockid = * ((unsigned *) &recvframe[12]); +#if defined WORDS_BIGENDIAN + seqid = byteSwap(seqid); + blockid = byteSwap(blockid); +#endif + //if the seconds counter is 0xFFFFFFFF, the data cannot be trusted. if (seqid == ~0U) { ++ nrPacketsRejected;