From 64d557a287f0e695856d6bc579293b399b8a07ea Mon Sep 17 00:00:00 2001 From: Sven Wegener Date: Sat, 14 Aug 2010 15:59:17 +0200 Subject: [PATCH] Fix internal tile locking g_list_find() only compares the pointer and not the filename it points to, use g_list_find_custom() with g_strcmp0() to actually check for the filename. Signed-off-by: Sven Wegener Signed-off-by: Guilhem Bonnefille --- src/download.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/download.c b/src/download.c index 065aba11..ed6fc982 100644 --- a/src/download.c +++ b/src/download.c @@ -124,7 +124,7 @@ static gboolean lock_file(const char *fn) { gboolean locked = FALSE; g_mutex_lock(file_list_mutex); - if (g_list_find(file_list, fn) == NULL) + if (g_list_find_custom(file_list, fn, g_strcmp0) == NULL) { // The filename is not yet locked file_list = g_list_append(file_list, (gpointer)fn), -- 2.39.5