diff options
author | James Feist <james.feist@linux.intel.com> | 2018-06-28 11:44:35 -0700 |
---|---|---|
committer | James Feist <james.feist@linux.intel.com> | 2018-07-11 17:30:05 -0700 |
commit | 394ec940b20cb5632ea6612d2145d6fae87d74c1 (patch) | |
tree | 68f3b89f9d911a70b0fa01a70df637ebc16cb507 /sdbusplus/asio | |
parent | 6c17d3db82a285b23354abf2b98688d631d2e4ae (diff) | |
download | sdbusplus-394ec940b20cb5632ea6612d2145d6fae87d74c1.tar.gz sdbusplus-394ec940b20cb5632ea6612d2145d6fae87d74c1.zip |
Correctly trigger interfaces added and removed
Asio was missing these signals, this was discovered while writing
the CPP mapper.
Tested: Restarted the fru device and watched using dbus-mointor.
Also devices were able to be found by the mapper after boot.
Change-Id: I9d6e9c6087e36a3b79853432f46cc3942d317340
Signed-off-by: James Feist <james.feist@linux.intel.com>
Diffstat (limited to 'sdbusplus/asio')
-rw-r--r-- | sdbusplus/asio/object_server.hpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sdbusplus/asio/object_server.hpp b/sdbusplus/asio/object_server.hpp index 531b858..3c0f534 100644 --- a/sdbusplus/asio/object_server.hpp +++ b/sdbusplus/asio/object_server.hpp @@ -136,6 +136,11 @@ class dbus_interface { vtable_.emplace_back(vtable::start()); } + ~dbus_interface() + { + conn_->emit_interfaces_removed(path_.c_str(), + std::vector<std::string>{name_}); + } // default getter and setter template <typename PropertyType> @@ -425,7 +430,8 @@ class dbus_interface static_cast<sdbusplus::bus::bus &>(*conn_), path_.c_str(), name_.c_str(), static_cast<const sd_bus_vtable *>(&vtable_[0]), this); - + conn_->emit_interfaces_added(path_.c_str(), + std::vector<std::string>{name_}); for (const std::string &name : propertyNames_) { signal_property(name); |