diff options
-rw-r--r-- | ahl-binding/ahl-binding.cpp | 2 | ||||
-rw-r--r-- | conf.d/project/etc/policy-4a-sample1.json | 30 |
2 files changed, 2 insertions, 30 deletions
diff --git a/ahl-binding/ahl-binding.cpp b/ahl-binding/ahl-binding.cpp index 2bf1664..37e6847 100644 --- a/ahl-binding/ahl-binding.cpp +++ b/ahl-binding/ahl-binding.cpp @@ -330,6 +330,8 @@ int ahl_binding_t::parse_roles_config(json_object* o) { assert(o != nullptr); assert(json_object_is_type(o, json_type_array)); + + if (roles_.size()) return 0; // Roles already added, ignore. size_t count = json_object_array_length(o); roles_.reserve(count); diff --git a/conf.d/project/etc/policy-4a-sample1.json b/conf.d/project/etc/policy-4a-sample1.json index 8aa7a03..a1aebcd 100644 --- a/conf.d/project/etc/policy-4a-sample1.json +++ b/conf.d/project/etc/policy-4a-sample1.json @@ -12,36 +12,6 @@ "onload": [], "controls": [], "events": [], - "ahl-4a": { - "hals": ["4a-hal-ctxnop-laptop"], - "roles": [ - { - "uid": "multimedia", - "description": "Multimedia content (e.g. tuner, media player, etc.)", - "priority": 0, - "stream": "multimedia" - }, - { - "uid": "emergency", - "description": "Safety-relevant or critical alerts/alarms", - "priority": 100, - "stream": "emergency", - "interrupts":[ - {"type": "ramp", "args": { "uid": "ramp-slow", "volume": 30} } - ] - }, - { - "uid": "navigation", - "name": "navigation", - "description": "Navigation instructions (GPS, turn directions, etc...)", - "priority": 25, - "stream": "navigation", - "interrupts":[ - {"type": "ramp", "args": { "uid": "ramp-slow", "volume": 30} } - ] - } - ] - }, "roles":[ { "uid": "multimedia", |