aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Tari <robert@tari.in>2022-07-13 01:03:27 +0200
committerRobert Tari <robert@tari.in>2022-07-13 01:03:27 +0200
commit3db4f035f8d755e4032e8253650ad6b983ec583c (patch)
tree7a7d3b716dafa4d6cf8400eea6944faeeaba0b57
parent755ee95aac94a55b6caa91cba4e89b21aa3c1043 (diff)
downloadlibayatana-indicator-3db4f035f8d755e4032e8253650ad6b983ec583c.tar.gz
libayatana-indicator-3db4f035f8d755e4032e8253650ad6b983ec583c.tar.bz2
libayatana-indicator-3db4f035f8d755e4032e8253650ad6b983ec583c.zip
src/indicator-service.c: Make failure to connect to the session DBus fatal
fixes https://github.com/AyatanaIndicators/libayatana-indicator/issues/64
-rw-r--r--src/indicator-service.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/indicator-service.c b/src/indicator-service.c
index be1db51..bb035e9 100644
--- a/src/indicator-service.c
+++ b/src/indicator-service.c
@@ -3,9 +3,11 @@ An object used to provide a simple interface for a service
to query version and manage whether it's running.
Copyright 2009 Canonical Ltd.
+Copyright 2022 Robert tari
Authors:
Ted Gould <ted@canonical.com>
+ Robert Tari <robert@tari.in>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -25,8 +27,6 @@ License along with this library. If not, see
#include "config.h"
#endif
-#include <stdlib.h> /* exit() */
-
#include <gio/gio.h>
#include "indicator-service.h"
@@ -349,10 +349,9 @@ bus_get_cb (__attribute__((unused)) GObject * object, GAsyncResult * res, gpoint
GError * error = NULL;
GDBusConnection * connection = g_bus_get_finish(res, &error);
- if (error != NULL) {
- g_warning("Unable to get a connection to the session DBus: %s", error->message);
- g_error_free(error);
- exit (0);
+ if (error != NULL)
+ {
+ g_error("Unable to get a connection to the session DBus: %s", error->message);
}
IndicatorServicePrivate * priv = indicator_service_get_instance_private(user_data);