[grilo-plugins] tracker: Check if Tracker is running



commit 6734f28dd91aa438b7f4472daf1feefc6c97cf0e
Author: Juan A. Suarez Romero <jasuarez igalia com>
Date:   Fri Apr 1 10:29:23 2011 +0200

    tracker: Check if Tracker is running
    
    If plugin cannot get a connection to Tracker, just skip this plugin.
    
    Signed-off-by: Juan A. Suarez Romero <jasuarez igalia com>

 src/media/tracker/grl-tracker.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/src/media/tracker/grl-tracker.c b/src/media/tracker/grl-tracker.c
index e48dbd4..8f9450f 100644
--- a/src/media/tracker/grl-tracker.c
+++ b/src/media/tracker/grl-tracker.c
@@ -183,11 +183,18 @@ tracker_get_connection_cb (GObject             *object,
                            GAsyncResult        *res,
                            const GrlPluginInfo *plugin)
 {
+  GError *error = NULL;
   /* GrlTrackerMedia *source; */
 
   GRL_DEBUG ("%s", __FUNCTION__);
 
-  grl_tracker_connection = tracker_sparql_connection_get_finish (res, NULL);
+  grl_tracker_connection = tracker_sparql_connection_get_finish (res, &error);
+
+  if (error) {
+    GRL_WARNING ("Could not get connection to Tracker: %s", error->message);
+    g_error_free (error);
+    return;
+  }
 
   GRL_DEBUG ("\trequest : '%s'", TRACKER_UPNP_CLASS_REQUEST);
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]