From 394ec940b20cb5632ea6612d2145d6fae87d74c1 Mon Sep 17 00:00:00 2001 From: James Feist Date: Thu, 28 Jun 2018 11:44:35 -0700 Subject: 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 --- sdbusplus/asio/object_server.hpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'sdbusplus/asio') 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{name_}); + } // default getter and setter template @@ -425,7 +430,8 @@ class dbus_interface static_cast(*conn_), path_.c_str(), name_.c_str(), static_cast(&vtable_[0]), this); - + conn_->emit_interfaces_added(path_.c_str(), + std::vector{name_}); for (const std::string &name : propertyNames_) { signal_property(name); -- cgit v1.2.1