diff options
author | Loïc Collignon <loic.collignon@iot.bzh> | 2018-10-31 14:07:10 +0100 |
---|---|---|
committer | Loïc Collignon <loic.collignon@iot.bzh> | 2018-10-31 14:09:09 +0100 |
commit | 00340de676ba1cac9c43e2d0ba366e9a593581a4 (patch) | |
tree | 0a395e9b0e5fd9d2a1459f9d3fa501c0e03ca077 /ahl-binding/role.hpp | |
parent | 2a4dcc1cbb84a8e39461eaa871e268d2460dad74 (diff) |
Fix undefined role's state at construct
Role's state should be set to closed at construct.
Bug: SPEC-1834
Change-Id: If2dde2d8614fd55048a8a91209a5a5ae842c3fb1
Signed-off-by: Loïc Collignon <loic.collignon@iot.bzh>
Diffstat (limited to 'ahl-binding/role.hpp')
-rw-r--r-- | ahl-binding/role.hpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/ahl-binding/role.hpp b/ahl-binding/role.hpp index 143a717..055a405 100644 --- a/ahl-binding/role.hpp +++ b/ahl-binding/role.hpp @@ -33,8 +33,8 @@ private: std::vector<interrupt_t> interrupts_; std::string device_uri_; - bool opened_; - + bool opened_ = false; + int apply_policy(afb_req_t req); void do_mute(afb_req_t, bool); @@ -45,14 +45,14 @@ public: explicit role_t(role_t&&) = default; ~role_t() = default; - + role_t& operator=(const role_t&) = default; role_t& operator=(role_t&&) = default; static role_t from_json(json_object* o); explicit role_t(json_object* j); - + role_t& operator<<(json_object* j); std::string uid() const; @@ -63,7 +63,7 @@ public: const std::vector<interrupt_t>& interrupts() const; std::string device_uri() const; bool opened() const; - + void uid(std::string v); void description(std::string v); void hal(std::string v); |