aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2019-05-27 11:56:34 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2019-05-27 11:56:34 +0200
commitb5379c15a2f2d2dbdcb250542331a2c477a0aeb1 (patch)
treee1def719c1c150a90901ab15afe2503d1b4ec9c8
parentf23b8d71851b11703016f97536ef56d8080a921b (diff)
downloadodr-edilib-b5379c15a2f2d2dbdcb250542331a2c477a0aeb1.tar.gz
odr-edilib-b5379c15a2f2d2dbdcb250542331a2c477a0aeb1.tar.bz2
odr-edilib-b5379c15a2f2d2dbdcb250542331a2c477a0aeb1.zip
Avoid unintentional truncation of UdpPacket
-rw-r--r--test/main.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/main.cpp b/test/main.cpp
index dc09adc..94df93d 100644
--- a/test/main.cpp
+++ b/test/main.cpp
@@ -75,9 +75,9 @@ class UdpReceiver {
UdpSocket sock(m_port);
const size_t packsize = 8192;
- UdpPacket packet(packsize);
while (not m_stop) {
+ UdpPacket packet(packsize);
int ret = sock.receive(packet);
if (ret == 0) {
if (packet.getSize() == packsize) {