From ffb9d48d975cab3683bbbf9f94e0eacefcf4ce5b Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Mon, 24 Aug 2009 18:08:21 +0200 Subject: separate DBus::Glib::BusDispatcher creating from CommLayerServerDBus creation it's technically wrong to do it that way. It was not biting us because we were creating just one object, but it was also ugly. Signed-off-by: Denys Vlasenko --- src/Daemon/CommLayerServerDBus.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/Daemon/CommLayerServerDBus.h') diff --git a/src/Daemon/CommLayerServerDBus.h b/src/Daemon/CommLayerServerDBus.h index fe95d5c..ad24506 100644 --- a/src/Daemon/CommLayerServerDBus.h +++ b/src/Daemon/CommLayerServerDBus.h @@ -13,7 +13,6 @@ class CCommLayerServerDBus { private: DBus::Connection *m_pConn; - DBus::Glib::BusDispatcher *m_pDispatcher; static DBus::Connection *init_dbus(CCommLayerServerDBus *self); public: CCommLayerServerDBus(); @@ -44,3 +43,8 @@ class CCommLayerServerDBus virtual void Warning(const std::string& pDest, const std::string& pMessage); }; +/* + * This must be done before instances of CCommLayerServerDBus are created + * (otherwise "new DBus::Connection(DBus::Connection::SystemBus())" fails) + */ +void attach_dbus_dispatcher_to_glib_main_context(); -- cgit