summaryrefslogtreecommitdiffstats
path: root/src/zmq2edi
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2019-02-25 11:19:55 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2019-02-25 11:19:55 +0100
commita17aeedf5d70e8e0328ea19bacdfa298092f318a (patch)
treec0b48225e7fd1ce14c617b5a0a1c717628f756bb /src/zmq2edi
parent1691e347524655f3c991af3881febcde7083f1ac (diff)
downloaddabmux-a17aeedf5d70e8e0328ea19bacdfa298092f318a.tar.gz
dabmux-a17aeedf5d70e8e0328ea19bacdfa298092f318a.tar.bz2
dabmux-a17aeedf5d70e8e0328ea19bacdfa298092f318a.zip
zmq2edi: Fix MNSC endianness swap
Diffstat (limited to 'src/zmq2edi')
-rw-r--r--src/zmq2edi/EDISender.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/zmq2edi/EDISender.cpp b/src/zmq2edi/EDISender.cpp
index 112aadb..0df633f 100644
--- a/src/zmq2edi/EDISender.cpp
+++ b/src/zmq2edi/EDISender.cpp
@@ -192,8 +192,8 @@ void EDISender::send_eti_frame(uint8_t* p, metadata_t metadata)
edi_subchannelToTag[i] = tag_ESTn;
}
- const uint16_t mnsc = p[8 + 4*nst] * 256 + \
- p[8 + 4*nst + 1];
+ uint16_t mnsc = 0;
+ std::memcpy(&mnsc, p + 8 + 4*nst, sizeof(uint16_t));
edi_tagDETI.mnsc = mnsc;
/*const uint16_t crc1 = p[8 + 4*nst + 2]*256 + \