[tracker] libtracker-miner: add explicit tracker_miner_dbus_terminate() call.
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] libtracker-miner: add explicit tracker_miner_dbus_terminate() call.
- Date: Thu, 25 Feb 2010 13:33:27 +0000 (UTC)
commit ec3e810adb488ba7b7da4135ccf490b4583540f5
Author: Carlos Garnacho <carlos lanedo com>
Date: Thu Feb 25 13:02:17 2010 +0100
libtracker-miner: add explicit tracker_miner_dbus_terminate() call.
src/libtracker-miner/tracker-dbus.c | 10 ++++++++++
src/libtracker-miner/tracker-dbus.h | 5 +++--
src/libtracker-miner/tracker-miner.c | 2 ++
3 files changed, 15 insertions(+), 2 deletions(-)
---
diff --git a/src/libtracker-miner/tracker-dbus.c b/src/libtracker-miner/tracker-dbus.c
index 981398a..ffbc3b4 100644
--- a/src/libtracker-miner/tracker-dbus.c
+++ b/src/libtracker-miner/tracker-dbus.c
@@ -254,6 +254,16 @@ tracker_miner_dbus_init (TrackerMiner *miner,
}
void
+tracker_miner_dbus_terminate (TrackerMiner *miner)
+{
+ if (G_UNLIKELY (dbus_data == 0)) {
+ return;
+ }
+
+ g_object_set_qdata (G_OBJECT (miner), dbus_data, NULL);
+}
+
+void
tracker_miner_dbus_add_name_watch (TrackerMiner *miner,
const gchar *name,
TrackerMinerDBusNameFunc func)
diff --git a/src/libtracker-miner/tracker-dbus.h b/src/libtracker-miner/tracker-dbus.h
index d163aaf..680268e 100644
--- a/src/libtracker-miner/tracker-dbus.h
+++ b/src/libtracker-miner/tracker-dbus.h
@@ -28,8 +28,9 @@ typedef void (* TrackerMinerDBusNameFunc) (TrackerMiner *miner,
const gchar *name,
gboolean available);
-void tracker_miner_dbus_init (TrackerMiner *miner,
- const DBusGObjectInfo *info);
+void tracker_miner_dbus_init (TrackerMiner *miner,
+ const DBusGObjectInfo *info);
+void tracker_miner_dbus_terminate (TrackerMiner *miner);
void tracker_miner_dbus_add_name_watch (TrackerMiner *miner,
const gchar *name,
diff --git a/src/libtracker-miner/tracker-miner.c b/src/libtracker-miner/tracker-miner.c
index cd7f04e..2739527 100644
--- a/src/libtracker-miner/tracker-miner.c
+++ b/src/libtracker-miner/tracker-miner.c
@@ -418,6 +418,8 @@ miner_finalize (GObject *object)
g_hash_table_unref (miner->private->pauses);
g_ptr_array_free (miner->private->async_calls, TRUE);
+ tracker_miner_dbus_terminate (miner);
+
G_OBJECT_CLASS (tracker_miner_parent_class)->finalize (object);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]