[PATCH] Do no add auto split to browse if less count are requested in browse



I was experiencing some weird crashes when testing my pagination code in
mafw-grilo-source with my fremantle branches. I checked the fixes about
pagination and I saw that there was one about do not setting the
autosplit if we request less count than the auto split threshold, but it
only applied to search and query, not to browse. I think it is also
necessary for the browse operation, at least in the fremantle branch. I
am sending the patch here.

Br.

-- 
Xabier Rodríguez Calvar
Enxeñeiro en Informática
IGALIA http://www.igalia.com
From 09ebd5476f94dce33fe0824a5ec1a0aa13eb5b4a Mon Sep 17 00:00:00 2001
From: Xabier Rodriguez Calvar <xrcalvar igalia com>
Date: Thu, 24 Jun 2010 12:53:35 +0200
Subject: [PATCH] core: Don't add auto split if less count are requested in browse

This is the same we do for query and search.
---
 src/grl-media-source.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/grl-media-source.c b/src/grl-media-source.c
index fce0c95..97390f1 100644
--- a/src/grl-media-source.c
+++ b/src/grl-media-source.c
@@ -1204,7 +1204,8 @@ grl_media_source_browse (GrlMediaSource *source,
   brc->bspec = bs;
 
   /* Setup auto-split management if requested */
-  if (source->priv->auto_split_threshold > 0) {
+  if (source->priv->auto_split_threshold > 0 &&
+      count > source->priv->auto_split_threshold) {
     g_debug ("auto-split: enabled");
     struct AutoSplitCtl *as_ctl = g_new0 (struct AutoSplitCtl, 1);
     as_ctl->count = count;
-- 
1.7.1

Attachment: signature.asc
Description: Esta =?ISO-8859-1?Q?=E9?= unha parte de mensaxe asinada dixitalmente



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