[grilo-plugins/tracker-notification: 5/17] tracker: avoid using the same media instance
- From: Lionel Landwerlin <llandwerlin src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [grilo-plugins/tracker-notification: 5/17] tracker: avoid using the same media instance
- Date: Fri, 4 Mar 2011 17:30:33 +0000 (UTC)
commit 4fda3ed00f50b46a839882b6d61f03e2d9f9b624
Author: Lionel Landwerlin <lionel g landwerlin linux intel com>
Date: Mon Feb 14 18:09:24 2011 +0000
tracker: avoid using the same media instance
Don't notify multiple objects removal with the same media instance.
Signed-off-by: Lionel Landwerlin <lionel g landwerlin linux intel com>
src/media/tracker/grl-tracker-notif.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/media/tracker/grl-tracker-notif.c b/src/media/tracker/grl-tracker-notif.c
index 52f061d..9194eac 100644
--- a/src/media/tracker/grl-tracker-notif.c
+++ b/src/media/tracker/grl-tracker-notif.c
@@ -289,7 +289,6 @@ tracker_evt_update_orphans (tracker_evt_update_t *evt)
return;
}
- media = grl_media_new ();
sources = grl_plugin_registry_get_sources (grl_plugin_registry_get_default (),
FALSE);
@@ -305,6 +304,7 @@ tracker_evt_update_orphans (tracker_evt_update_t *evt)
break;
} else {
/* Notify all sources that a been removed */
+ media = grl_media_new ();
str_id = g_strdup_printf ("%u", id);
grl_media_set_id (media, str_id);
g_free (str_id);
@@ -321,6 +321,7 @@ tracker_evt_update_orphans (tracker_evt_update_t *evt)
}
source = source->next;
}
+ g_object_unref (media);
}
subject = subject->next;
}
@@ -334,6 +335,7 @@ tracker_evt_update_orphans (tracker_evt_update_t *evt)
g_string_append_printf (request_str, ", %u", id);
} else {
/* Notify all sources that a been removed */
+ media = grl_media_new ();
str_id = g_strdup_printf ("%u", id);
grl_media_set_id (media, str_id);
g_free (str_id);
@@ -350,6 +352,7 @@ tracker_evt_update_orphans (tracker_evt_update_t *evt)
}
source = source->next;
}
+ g_object_unref (media);
}
subject = subject->next;
}
@@ -368,7 +371,6 @@ tracker_evt_update_orphans (tracker_evt_update_t *evt)
tracker_evt_postupdate_sources (evt);
}
- g_object_unref (media);
g_string_free (request_str, TRUE);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]