Merge pull request #454 from bebehei/no-dbus-conn-error

Distinguish DBus connection and name acquired error
This commit is contained in:
Nikos Tsipinakis 2017-12-08 17:51:45 +02:00 committed by GitHub
commit 85c3c08668
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -418,7 +418,11 @@ static void on_name_lost(GDBusConnection *connection,
const gchar *name, const gchar *name,
gpointer user_data) gpointer user_data)
{ {
fprintf(stderr, "Name Lost. Is Another notification daemon running?\n"); if (connection)
fprintf(stderr, "Cannot acquire 'org.freedesktop.Notifications'."
"Is Another notification daemon running?\n");
else
fprintf(stderr, "Cannot connect to DBus.\n");
exit(1); exit(1);
} }