[grilo-plugins] freebox: Fix incorrect grl-pls usage



commit ed2eb4f6d09c05c299a8bda3fdbb203bed7a1127
Author: Bastien Nocera <hadess hadess net>
Date:   Mon Feb 9 02:43:09 2015 +0100

    freebox: Fix incorrect grl-pls usage
    
    Which could lead to crashes. grl_pls_browse() should only be used
    from applications, grl_pls_browse_by_spec() should be used in plugins
    instead so as not to override the operation_id, be cancelled when the
    original operation is cancelled, etc.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=744168

 src/freebox/grl-freebox.c |   22 ++++++++--------------
 1 files changed, 8 insertions(+), 14 deletions(-)
---
diff --git a/src/freebox/grl-freebox.c b/src/freebox/grl-freebox.c
index 8ad3bfc..85e1d77 100644
--- a/src/freebox/grl-freebox.c
+++ b/src/freebox/grl-freebox.c
@@ -416,21 +416,15 @@ grl_freebox_source_browse (GrlSource           *source,
 {
   GrlFreeboxSourcePrivate *priv = GRL_FREEBOX_SOURCE (source)->priv;
 
+  bs->container = g_object_ref (priv->media);
+
   if (g_strcmp0 (grl_source_get_id (source), TV_SOURCE_ID) == 0) {
-    grl_pls_browse (source,
-                    priv->media,
-                    bs->keys,
-                    bs->options,
-                    filter_func_tv,
-                    bs->callback,
-                    bs->user_data);
+    grl_pls_browse_by_spec (source,
+                            filter_func_tv,
+                            bs);
   } else {
-    grl_pls_browse (source,
-                    priv->media,
-                    bs->keys,
-                    bs->options,
-                    filter_func_radio,
-                    bs->callback,
-                    bs->user_data);
+    grl_pls_browse_by_spec (source,
+                            filter_func_radio,
+                            bs);
   }
 }


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