aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/ConfigParser.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/ConfigParser.cpp b/src/ConfigParser.cpp
index 7a69202..dd0041e 100644
--- a/src/ConfigParser.cpp
+++ b/src/ConfigParser.cpp
@@ -505,7 +505,7 @@ static void parse_general(ptree& pt,
auto cl = make_shared<AnnouncementCluster>(name);
cl->cluster_id = hexparse(pt_announcement.get<string>("cluster"));
- if (cl->cluster_id == 0 or cl->cluster_id == 0xFF) {
+ if (cl->cluster_id == 0) {
throw runtime_error("Announcement cluster id " +
to_string(cl->cluster_id) + " is not allowed");
}
@@ -575,13 +575,19 @@ void parse_ptree(
continue;
}
try {
- service->clusters.push_back(hexparse(cluster_s));
+ auto cluster_id = hexparse(cluster_s);
+ if (cluster_id == 255) {
+ etiLog.level(warn) << "Announcement cluster id " +
+ to_string(cluster_id) + " is not allowed and is ignored in FIG 0/18.";
+ continue;
+ }
+ service->clusters.push_back(cluster_id);
}
catch (const std::exception& e) {
etiLog.level(warn) << "Cannot parse '" << clusterlist <<
"' announcement clusters for service " << serviceuid <<
": " << e.what();
- }
+ }
}
if (service->ASu != 0 and service->clusters.empty()) {