Commit bd184872 authored by Arjen Hiemstra's avatar Arjen Hiemstra
Browse files

Exit immediately if we cannot register the dbus service

Otherwise you end up with thinking things are running while they are
not.
parent 484c86a3
......@@ -64,7 +64,10 @@ void KSysGuardDaemon::init()
{
loadProviders();
QDBusConnection::sessionBus().registerObject("/", this, QDBusConnection::ExportAdaptors);
QDBusConnection::sessionBus().registerService("org.kde.ksystemstats");
if (!QDBusConnection::sessionBus().registerService("org.kde.ksystemstats")) {
qCritical() << "Unable to register DBus service org.kde.ksystemstats. Maybe it is already running?";
exit(1);
}
}
void KSysGuardDaemon::loadProviders()
......
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