[grilo] core: Do not print cancelled operations as error



commit 0a49a1d0ce38a6a56047f756d26d81ef723fea4e
Author: Juan A. Suarez Romero <jasuarez igalia com>
Date:   Thu Apr 14 13:47:16 2011 +0000

    core: Do not print cancelled operations as error
    
    When debugging an error, notify if the error is actually a proper error or a
    cancelled operation.
    
    Signed-off-by: Juan A. Suarez Romero <jasuarez igalia com>

 src/grl-media-source.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/src/grl-media-source.c b/src/grl-media-source.c
index fd1a9ea..be3c7b6 100644
--- a/src/grl-media-source.c
+++ b/src/grl-media-source.c
@@ -1255,7 +1255,11 @@ metadata_full_resolution_ctl_cb (GrlMediaSource *source,
 
   /* If we got an error, invoke the user callback right away and bail out */
   if (error) {
-    GRL_WARNING ("Operation failed: %s", error->message);
+    if (error->code == GRL_CORE_ERROR_OPERATION_CANCELLED) {
+      GRL_DEBUG ("Operation cancelled");
+    } else {
+      GRL_WARNING ("Operation failed: %s", error->message);
+    }
     ctl_info->user_callback (source,
                              ctl_info->metadata_id,
 			     media,



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