[gnome-online-miners/wip/facebook] miner-main: Fix and simplify reference counting
- From: Álvaro Peña <alvaropg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-online-miners/wip/facebook] miner-main: Fix and simplify reference counting
- Date: Fri, 22 Nov 2013 21:42:47 +0000 (UTC)
commit 46c293e757b44c356afd4dc05b7dfd2a8578b1f6
Author: Debarshi Ray <debarshir gnome org>
Date: Fri Aug 16 14:07:41 2013 +0200
miner-main: Fix and simplify reference counting
https://bugzilla.gnome.org/show_bug.cgi?id=706126
src/gom-miner-main.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/gom-miner-main.c b/src/gom-miner-main.c
index 1c89670..2e0b0a0 100644
--- a/src/gom-miner-main.c
+++ b/src/gom-miner-main.c
@@ -117,6 +117,8 @@ miner_refresh_db_ready_cb (GObject *source,
{
g_dbus_method_invocation_return_value (invocation, NULL);
}
+
+ g_object_unref (invocation);
}
static void
@@ -132,9 +134,7 @@ handle_refresh_db (GDBusMethodInvocation *invocation)
cancellable = g_cancellable_new ();
gom_miner_refresh_db_async (miner, cancellable,
- miner_refresh_db_ready_cb, invocation);
-
- g_object_unref (miner);
+ miner_refresh_db_ready_cb, g_object_ref (invocation));
}
static void
@@ -148,7 +148,7 @@ handle_method_call (GDBusConnection *connection,
gpointer user_data)
{
if (g_strcmp0 (method_name, "RefreshDB") == 0)
- handle_refresh_db (g_object_ref (invocation));
+ handle_refresh_db (invocation);
else
g_assert_not_reached ();
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]