[grilo] grl-source: fixed compare_queue_element function
- From: Juan A. Suarez Romero <jasuarez src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [grilo] grl-source: fixed compare_queue_element function
- Date: Mon, 26 Nov 2012 09:22:21 +0000 (UTC)
commit bdeb52ad5d2e79f262bbbc030fd7a292bcc59252
Author: Andrzej Bieniek <andyhelp gmail com>
Date: Sun Nov 25 10:18:03 2012 +0000
grl-source: fixed compare_queue_element function
Function should return 0 only when elements are equal.
compare_queue_element function was returning 0 every time qelement->media pointer was higher or equal media pointer (qelement->media < media).
It worked couple of times then failed, depends where memory was allocated.
When it failed, wrong element in BrowseRelayCb::queue was marked as ready (in media_ready_cb).
As a consequence grilo locked up not returning all elements in grl_source_browse call.
https://bugzilla.gnome.org/show_bug.cgi?id=689053
src/grl-source.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/grl-source.c b/src/grl-source.c
index 3ef2c82..f631358 100644
--- a/src/grl-source.c
+++ b/src/grl-source.c
@@ -1994,7 +1994,7 @@ static gint
compare_queue_element (QueueElement *qelement,
GrlMedia *media)
{
- return qelement->media < media;
+ return qelement->media != media; //return 0 when equal
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]