After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 689053 - grl-source: fix compare_queue_element function
grl-source: fix compare_queue_element function
Status: RESOLVED FIXED
Product: grilo
Classification: Other
Component: core
git master
Other Linux
: Normal critical
: ---
Assigned To: grilo-maint
grilo-maint
Depends on:
Blocks:
 
 
Reported: 2012-11-25 21:20 UTC by Andrzej Bieniek
Modified: 2012-11-26 09:22 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
fixed compare_queue_element function patch (1.10 KB, patch)
2012-11-25 21:33 UTC, Andrzej Bieniek
committed Details | Review

Description Andrzej Bieniek 2012-11-25 21:20:12 UTC
Function should return 0 only when elements are equal.

compare_queue_element 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.

(tested with grilo-mediaserver2)
Comment 1 Andrzej Bieniek 2012-11-25 21:33:49 UTC
Created attachment 229863 [details] [review]
fixed compare_queue_element function patch
Comment 2 Juan A. Suarez Romero 2012-11-26 09:22:35 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 file changed, 1 insertion(+), 1 deletion(-)