manager: claim busname after startup complete
Idiomatic DBus programming would have us defer claiming a well known bus
name until after all of our startup initialization is done. This avoids
unnecessary PropertiesChanged or ObjectManager signals during our
startup phase with callbacks that generate dbus activity such as
createObjects or setProperty.
Change-Id: I5f91bbc2a9a5b343e8db214ebadb52bc71b2d459
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
diff --git a/test/test.cpp b/test/test.cpp
index 7be9c64..5d020e9 100644
--- a/test/test.cpp
+++ b/test/test.cpp
@@ -472,10 +472,10 @@
int main()
{
phosphor::inventory::manager::Manager mgr(sdbusplus::bus::new_default(),
- MGR_SERVICE, MGR_ROOT);
+ MGR_ROOT);
ExampleService d;
- auto f1 = [](auto mgr) { mgr->run(); };
+ auto f1 = [](auto mgr) { mgr->run(MGR_SERVICE); };
auto f2 = [](auto d) { d->run(); };
auto t1 = std::thread(f1, &mgr);