[grilo-plugins] tracker: avoid warning messages when item being resolved is removed
- From: Juan A. Suarez Romero <jasuarez src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [grilo-plugins] tracker: avoid warning messages when item being resolved is removed
- Date: Thu, 17 Mar 2011 20:36:53 +0000 (UTC)
commit 56b7fc7d41a931de6dae3040acac1f21cda47912
Author: Lionel Landwerlin <lionel g landwerlin linux intel com>
Date: Fri Mar 11 15:03:50 2011 +0000
tracker: avoid warning messages when item being resolved is removed
Signed-off-by: Lionel Landwerlin <lionel g landwerlin linux intel com>
src/media/tracker/grl-tracker-media-api.c | 14 +++++++-------
src/media/tracker/grl-tracker-metadata.c | 16 ++++++++--------
2 files changed, 15 insertions(+), 15 deletions(-)
---
diff --git a/src/media/tracker/grl-tracker-media-api.c b/src/media/tracker/grl-tracker-media-api.c
index 17060c7..b61fdd6 100644
--- a/src/media/tracker/grl-tracker-media-api.c
+++ b/src/media/tracker/grl-tracker-media-api.c
@@ -412,16 +412,16 @@ tracker_metadata_cb (GObject *source_object,
}
- tracker_sparql_cursor_next (cursor, NULL, NULL);
+ if (tracker_sparql_cursor_next (cursor, NULL, NULL)) {
+ /* Translate Sparql result into Grilo result */
+ for (col = 0 ; col < tracker_sparql_cursor_get_n_columns (cursor) ; col++) {
+ fill_grilo_media_from_sparql (GRL_TRACKER_MEDIA (ms->source),
+ ms->media, cursor, col);
+ }
- /* Translate Sparql result into Grilo result */
- for (col = 0 ; col < tracker_sparql_cursor_get_n_columns (cursor) ; col++) {
- fill_grilo_media_from_sparql (GRL_TRACKER_MEDIA (ms->source),
- ms->media, cursor, col);
+ ms->callback (ms->source, ms->media, ms->user_data, NULL);
}
- ms->callback (ms->source, ms->media, ms->user_data, NULL);
-
end_operation:
if (cursor)
g_object_unref (G_OBJECT (cursor));
diff --git a/src/media/tracker/grl-tracker-metadata.c b/src/media/tracker/grl-tracker-metadata.c
index d9ff2ee..ef6b140 100644
--- a/src/media/tracker/grl-tracker-metadata.c
+++ b/src/media/tracker/grl-tracker-metadata.c
@@ -269,16 +269,16 @@ tracker_resolve_cb (GObject *source_object,
}
- tracker_sparql_cursor_next (cursor, NULL, NULL);
+ if (tracker_sparql_cursor_next (cursor, NULL, NULL)) {
+ /* Translate Sparql result into Grilo result */
+ for (col = 0 ; col < tracker_sparql_cursor_get_n_columns (cursor) ; col++) {
+ fill_grilo_media_from_sparql (GRL_TRACKER_METADATA (rs->source),
+ rs->media, cursor, col);
+ }
- /* Translate Sparql result into Grilo result */
- for (col = 0 ; col < tracker_sparql_cursor_get_n_columns (cursor) ; col++) {
- fill_grilo_media_from_sparql (GRL_TRACKER_METADATA (rs->source),
- rs->media, cursor, col);
+ rs->callback (rs->source, rs->media, rs->user_data, NULL);
}
- rs->callback (rs->source, rs->media, rs->user_data, NULL);
-
end_operation:
if (cursor)
g_object_unref (G_OBJECT (cursor));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]