diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2015-08-09 18:15:16 +0200 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2015-08-09 18:15:16 +0200 |
commit | ce9792fc49e4722a927b790c08ad83bdad673e7e (patch) | |
tree | 25d6d097dfeea29bd997873c18fdebce9172763c /src/DabMultiplexer.cpp | |
parent | f9bdf5bec2f3778c4fef99da698a8a7a6f182fe0 (diff) | |
download | dabmux-ce9792fc49e4722a927b790c08ad83bdad673e7e.tar.gz dabmux-ce9792fc49e4722a927b790c08ad83bdad673e7e.tar.bz2 dabmux-ce9792fc49e4722a927b790c08ad83bdad673e7e.zip |
EDI: Do not use misbehaving UdpPacket
Diffstat (limited to 'src/DabMultiplexer.cpp')
-rw-r--r-- | src/DabMultiplexer.cpp | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/src/DabMultiplexer.cpp b/src/DabMultiplexer.cpp index e9fb0c1..e1c815d 100644 --- a/src/DabMultiplexer.cpp +++ b/src/DabMultiplexer.cpp @@ -1790,15 +1790,12 @@ void DabMultiplexer::mux_frame(std::vector<boost::shared_ptr<DabOutput> >& outpu // Send over ethernet for (const auto& edi_frag : edi_fragments) { - UdpPacket udppacket; - InetAddress& addr = udppacket.getAddress(); + InetAddress addr; addr.setAddress(edi_conf.dest_addr.c_str()); addr.setPort(edi_conf.dest_port); - udppacket.addData(&(edi_frag.front()), edi_frag.size()); - - edi_output.send(udppacket); + edi_output.send(edi_frag, addr); if (edi_conf.dump) { std::ostream_iterator<uint8_t> debug_iterator(edi_debug_file); @@ -1814,15 +1811,11 @@ void DabMultiplexer::mux_frame(std::vector<boost::shared_ptr<DabOutput> >& outpu else { // Send over ethernet - UdpPacket udppacket; - - InetAddress& addr = udppacket.getAddress(); + InetAddress addr; addr.setAddress(edi_conf.dest_addr.c_str()); addr.setPort(edi_conf.dest_port); - udppacket.addData(&(edi_afpacket.front()), edi_afpacket.size()); - - edi_output.send(udppacket); + edi_output.send(edi_afpacket, addr); if (edi_conf.dump) { std::ostream_iterator<uint8_t> debug_iterator(edi_debug_file); |