[tracker/writeback] Clean exit when service already running
- From: Philip Van Hoof <pvanhoof src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [tracker/writeback] Clean exit when service already running
- Date: Tue, 24 Nov 2009 12:17:32 +0000 (UTC)
commit 221ccbc9ffc2e9d6581120f94f91a108873aca23
Author: Philip Van Hoof <philip codeminded be>
Date: Tue Nov 24 13:16:04 2009 +0100
Clean exit when service already running
.../tracker-writeback-dispatcher.c | 13 ++++++++++---
1 files changed, 10 insertions(+), 3 deletions(-)
---
diff --git a/src/tracker-writeback/tracker-writeback-dispatcher.c b/src/tracker-writeback/tracker-writeback-dispatcher.c
index c91c485..3a380db 100644
--- a/src/tracker-writeback/tracker-writeback-dispatcher.c
+++ b/src/tracker-writeback/tracker-writeback-dispatcher.c
@@ -17,6 +17,7 @@
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
+#include <stdlib.h>
#include <libtracker-common/tracker-dbus.h>
#include <libtracker-client/tracker.h>
@@ -93,9 +94,9 @@ dbus_register_service (DBusGProxy *proxy,
}
if (result != DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER) {
- g_critical ("D-Bus service name:'%s' is already taken, "
- "perhaps the application is already running?",
- name);
+ g_message ("D-Bus service name:'%s' is already taken, "
+ "perhaps the application is already running?",
+ name);
return FALSE;
}
@@ -191,6 +192,12 @@ tracker_writeback_dispatcher_init (TrackerWritebackDispatcher *dispatcher)
priv->client = tracker_connect (TRUE, 0);
priv->dbus_data = dbus_data_create (G_OBJECT (dispatcher));
+
+ if (!priv->dbus_data) {
+ tracker_disconnect (priv->client);
+ exit (EXIT_FAILURE);
+ }
+
priv->modules = g_hash_table_new_full (g_str_hash,
g_str_equal,
(GDestroyNotify) g_free,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]