[gvfs/wip/oholy/google-cache-conservative: 32/39] google: Move debug prints before releasing entry



commit a23901a8157ef420ef68af05d65d4df3f856d92e
Author: Ondrej Holy <oholy redhat com>
Date:   Wed Aug 1 13:43:16 2018 +0200

    google: Move debug prints before releasing entry
    
    Debug output contains mess because id and title are const gchar *
    and are released together with GDataEntry on previous line. Let's
    just swap the lines.

 daemon/gvfsbackendgoogle.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/daemon/gvfsbackendgoogle.c b/daemon/gvfsbackendgoogle.c
index 3b82375f..80fbca99 100644
--- a/daemon/gvfsbackendgoogle.c
+++ b/daemon/gvfsbackendgoogle.c
@@ -510,13 +510,13 @@ remove_entry (GVfsBackendGoogle *self,
   parent_id = get_parent_id (self, entry);
 
   k = dir_entries_key_new (id, parent_id);
-  g_hash_table_remove (self->dir_entries, k);
   g_debug ("  remove_entry: Removed (%s, %s) -> %p\n", id, parent_id, entry);
+  g_hash_table_remove (self->dir_entries, k);
   dir_entries_key_free (k);
 
   k = dir_entries_key_new (title, parent_id);
-  g_hash_table_remove (self->dir_entries, k);
   g_debug ("  remove_entry: Removed (%s, %s) -> %p\n", title, parent_id, entry);
+  g_hash_table_remove (self->dir_entries, k);
   dir_entries_key_free (k);
 
   for (l = self->dir_collisions; l != NULL; l = l->next)


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