Commit c60b50b1 authored by Max Kellermann's avatar Max Kellermann

neighbor/udisks2: use SafeSingleton for managing the ODBus::Glue instance

Allows other objects to use the same single instance as well.
parent f3ffdaf2
......@@ -32,6 +32,7 @@
#include "neighbor/Listener.hxx"
#include "neighbor/Info.hxx"
#include "thread/Mutex.hxx"
#include "thread/SafeSingleton.hxx"
#include "util/Domain.hxx"
#include "util/StringAPI.hxx"
#include "util/Manual.hxx"
......@@ -74,7 +75,7 @@ class UdisksNeighborExplorer final
EventLoop &event_loop;
Manual<ODBus::Glue> dbus_glue;
Manual<SafeSingleton<ODBus::Glue>> dbus_glue;
ODBus::PendingCall pending_list_call;
......@@ -97,7 +98,7 @@ public:
}
auto &&GetConnection() noexcept {
return dbus_glue->GetConnection();
return dbus_glue.Get()->GetConnection();
}
/* virtual methods from class NeighborExplorer */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment