From 21343ab11ca474bd4be5e9a328f1711359776601 Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Mon, 29 Jan 2018 11:29:43 +0100 Subject: PTy: add static/dynamic setting to configuration and RC --- src/ConfigParser.cpp | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'src/ConfigParser.cpp') 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; -- cgit v1.2.3