summaryrefslogtreecommitdiffstats
path: root/src/ConfigParser.cpp
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2018-01-29 11:29:43 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2018-01-29 11:29:43 +0100
commit21343ab11ca474bd4be5e9a328f1711359776601 (patch)
tree3de2116746f60b662565c9c009cf458b36f02f7a /src/ConfigParser.cpp
parentf93da1ac5da7081b097d1420609b1833663493cd (diff)
downloaddabmux-21343ab11ca474bd4be5e9a328f1711359776601.tar.gz
dabmux-21343ab11ca474bd4be5e9a328f1711359776601.tar.bz2
dabmux-21343ab11ca474bd4be5e9a328f1711359776601.zip
PTy: add static/dynamic setting to configuration and RC
Diffstat (limited to 'src/ConfigParser.cpp')
-rw-r--r--src/ConfigParser.cpp16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/ConfigParser.cpp b/src/ConfigParser.cpp
index c2f286d..17b34ca 100644
--- a/src/ConfigParser.cpp
+++ b/src/ConfigParser.cpp
@@ -3,7 +3,7 @@
2011, 2012 Her Majesty the Queen in Right of Canada (Communications
Research Center Canada)
- Copyright (C) 2017
+ Copyright (C) 2018
Matthias P. Braendli, matthias.braendli@mpb.li
http://www.opendigitalradio.org
@@ -589,7 +589,19 @@ void parse_ptree(
}
service->id = new_service_id;
- service->pty = hexparse(pt_service.get("pty", "0"));
+ service->pty_settings.pty = hexparse(pt_service.get("pty", "0"));
+ // Default to dynamic for backward compatibility
+ const string dynamic_no_static_str = pt_service.get("pty-sd", "dynamic");
+ if (dynamic_no_static_str == "dynamic") {
+ service->pty_settings.dynamic_no_static = true;
+ }
+ else if (dynamic_no_static_str == "static") {
+ service->pty_settings.dynamic_no_static = false;
+ }
+ else {
+ throw runtime_error("pty-sd setting for service " +
+ serviceuid + " is invalid");
+ }
service->language = hexparse(pt_service.get("language", "0"));
allservices[serviceuid] = service;