aboutsummaryrefslogtreecommitdiffstats
path: root/src/DabMux.cpp
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2021-01-15 07:09:03 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2021-01-18 13:22:09 +0100
commit12670a017ddb14fbf4a932799051dcfe21dd6c78 (patch)
tree43675f68329676a1ff84f8a26bab8733be224c0b /src/DabMux.cpp
parentc1d33594ca424b56a34200a6e525cdb1317bad69 (diff)
downloaddabmux-12670a017ddb14fbf4a932799051dcfe21dd6c78.tar.gz
dabmux-12670a017ddb14fbf4a932799051dcfe21dd6c78.tar.bz2
dabmux-12670a017ddb14fbf4a932799051dcfe21dd6c78.zip
Common 6b5db53: Update zmq.hpp, TCPReceiveServer, EDI decoder and output
Diffstat (limited to 'src/DabMux.cpp')
-rw-r--r--src/DabMux.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/DabMux.cpp b/src/DabMux.cpp
index 4ae607c..4265412 100644
--- a/src/DabMux.cpp
+++ b/src/DabMux.cpp
@@ -111,7 +111,6 @@ typedef DWORD32 uint32_t;
using namespace std;
using boost::property_tree::ptree;
-using boost::property_tree::ptree_error;
volatile sig_atomic_t running = 1;
@@ -323,7 +322,6 @@ int main(int argc, char *argv[])
if (outputuid == "edi") {
ptree pt_edi = pt_outputs.get_child("edi");
- bool require_dest_port = false;
for (auto pt_edi_dest : pt_edi.get_child("destinations")) {
const auto proto = pt_edi_dest.second.get<string>("protocol", "udp");
@@ -335,9 +333,16 @@ int main(int argc, char *argv[])
dest->source_addr = pt_edi_dest.second.get<string>("source", "");
dest->source_port = pt_edi_dest.second.get<unsigned int>("sourceport");
- edi_conf.destinations.push_back(dest);
+ dest->dest_port = pt_edi_dest.second.get<unsigned int>("port", 0);
+ if (dest->dest_port == 0) {
+ // Compatiblity: we have removed the transport and addressing in the
+ // PFT layer, which removed the requirement that all outputs must share
+ // the same destination port. If missing from the destination specification,
+ // we read it from the parent block, where it was before.
+ dest->dest_port = pt_edi.get<unsigned int>("port");
+ }
- require_dest_port = true;
+ edi_conf.destinations.push_back(dest);
}
else if (proto == "tcp") {
auto dest = make_shared<edi::tcp_server_t>();
@@ -350,14 +355,9 @@ int main(int argc, char *argv[])
}
}
- if (require_dest_port) {
- edi_conf.dest_port = pt_edi.get<unsigned int>("port");
- }
-
edi_conf.dump = pt_edi.get<bool>("dump", false);
edi_conf.enable_pft = pt_edi.get<bool>("enable_pft", false);
edi_conf.verbose = pt_edi.get<bool>("verbose", false);
- edi_conf.enable_transport_header = pt_edi.get<bool>("enable_transport_addressing", true);
edi_conf.fec = pt_edi.get<unsigned int>("fec", 3);
edi_conf.chunk_len = pt_edi.get<unsigned int>("chunk_len", 207);