diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2025-09-10 09:29:08 +0200 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2025-09-10 09:29:08 +0200 |
commit | d30cf3e7c31f9299062b9ef85a0949e60611509f (patch) | |
tree | 5240c7127791c2226212722c02d95ea21652a943 /src/DabMux.cpp | |
parent | 91531ce72ea4d90ea541f072da54bc46ef555db8 (diff) | |
parent | b59516179a3e1842de95f8aef549a75dac1102c6 (diff) | |
download | dabmux-d30cf3e7c31f9299062b9ef85a0949e60611509f.tar.gz dabmux-d30cf3e7c31f9299062b9ef85a0949e60611509f.tar.bz2 dabmux-d30cf3e7c31f9299062b9ef85a0949e60611509f.zip |
Merge commit 'b595161' into HEAD
Diffstat (limited to 'src/DabMux.cpp')
-rw-r--r-- | src/DabMux.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/DabMux.cpp b/src/DabMux.cpp index bf525c1..4b9352f 100644 --- a/src/DabMux.cpp +++ b/src/DabMux.cpp @@ -352,10 +352,9 @@ int main(int argc, char *argv[]) pft_settings.enable_pft = pt.get<bool>("enable_pft", default_enable_pft); pft_settings.fec = pt.get<unsigned int>("fec", default_fec); pft_settings.fragment_spreading_factor = default_spreading_factor; - auto override_spread_percent = pt.get_optional<int>("packet_spread"); - if (override_spread_percent) { + if (auto override_spread_percent = pt.get_optional<int>("packet_spread")) pft_settings.fragment_spreading_factor = check_spreading_factor(*override_spread_percent); - } + pft_settings.verbose = pt.get<bool>("verbose", edi_conf.verbose); }; @@ -364,12 +363,12 @@ int main(int argc, char *argv[]) if (proto == "udp") { auto dest = make_shared<edi::udp_destination_t>(); dest->dest_addr = pt_edi_dest.second.get<string>("destination"); - dest->ttl = pt_edi_dest.second.get<unsigned int>("ttl", 1); + if (auto ttl = pt_edi_dest.second.get_optional<unsigned int>("ttl")) + dest->ttl = *ttl; dest->source_addr = pt_edi_dest.second.get<string>("source", ""); - dest->source_port = pt_edi_dest.second.get<unsigned int>("sourceport"); - - dest->dest_port = pt_edi_dest.second.get<unsigned int>("port", 0); + dest->source_port = pt_edi_dest.second.get<unsigned int>("sourceport", 0); + 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 |