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>
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 @@
{
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 @@
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);