diff options
Diffstat (limited to 'src/ConfigParser.cpp')
-rw-r--r-- | src/ConfigParser.cpp | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/ConfigParser.cpp b/src/ConfigParser.cpp index 1ad9249..5290b0f 100644 --- a/src/ConfigParser.cpp +++ b/src/ConfigParser.cpp @@ -235,8 +235,7 @@ void parse_ptree(boost::property_tree::ptree& pt, bool service_already_existing = false; - for (auto srv : ensemble->services) - { + for (auto srv : ensemble->services) { if (srv->uid == serviceuid) { service = srv; service_already_existing = true; @@ -250,6 +249,18 @@ void parse_ptree(boost::property_tree::ptree& pt, service = new_srv; } + /* Parse ASu */ + service->ASu = 0; + for (size_t flag = 0; flag < 16; flag++) { + std::string announcement_name(annoucement_flags_names[flag]); + bool flag_set = + pt_service.get<bool>("announcements." + announcement_name, false); + + if (flag_set) { + service->ASu |= (1 << flag); + } + } + int success = -5; string servicelabel = pt_service.get<string>("label"); |