summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/persistence_client_library_dbus_service.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/persistence_client_library_dbus_service.c b/src/persistence_client_library_dbus_service.c
index 76abc18..c3c2624 100644
--- a/src/persistence_client_library_dbus_service.c
+++ b/src/persistence_client_library_dbus_service.c
@@ -412,6 +412,13 @@ int setup_dbus_mainloop(void)
dbus_error_init(&err);
+ if(!dbus_threads_init_default())
+ {
+ DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("setupMainLoop - initDefaultFailed() :"), DLT_STRING(err.message) );
+ dbus_error_free (&err);
+ return EPERS_COMMON;
+ }
+
if(pAddress != NULL) // Connect to the bus and check for errors
{
DLT_LOG(gPclDLTContext, DLT_LOG_DEBUG, DLT_STRING("setupMainLoop - specific dbus address:"), DLT_STRING(pAddress) );