]> git.street.me.uk Git - andy/viking.git/commitdiff
Fix internal tile locking
authorSven Wegener <sven.wegener@stealer.net>
Sat, 14 Aug 2010 13:59:17 +0000 (15:59 +0200)
committerGuilhem Bonnefille <guilhem.bonnefille@gmail.com>
Mon, 16 Aug 2010 21:36:53 +0000 (23:36 +0200)
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 <sven.wegener@stealer.net>
Signed-off-by: Guilhem Bonnefille <guilhem.bonnefille@gmail.com>
src/download.c

index 065aba11dbdc69486b90001b096d6ff75cca549a..ed6fc982c46125de35210f2310b0f50080e77cf6 100644 (file)
@@ -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),