Changeset 3502
- Timestamp:
- 03/18/08 14:46:30
- Files:
-
- trunk/ChangeLog (modified) (1 diff)
- trunk/libtinymail-camel/camel-lite/camel/camel-folder-summary.c (modified) (1 diff)
- trunk/libtinymailui-gtk/tny-gtk-header-list-model.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/ChangeLog
r3500 r3502 3 3 * Non-initialization of a variable caused memory corruption on the 4 4 stack 5 * Fixed race condition in case re-selecting the same folder 5 6 6 7 2008-03-17 Sergio Villar Senin <svillar@igalia.com> trunk/libtinymail-camel/camel-lite/camel/camel-folder-summary.c
r3497 r3502 874 874 { 875 875 if (!(mi->flags & CAMEL_MESSAGE_INFO_NEEDS_FREE)) { 876 mi->subject = " ";877 mi->to = " ";878 mi->from = " ";879 mi->cc = " ";876 mi->subject = "..."; 877 mi->to = "..."; 878 mi->from = "..."; 879 mi->cc = "..."; 880 880 } 881 881 } trunk/libtinymailui-gtk/tny-gtk-header-list-model.c
r3470 r3502 1076 1076 #endif 1077 1077 1078 static gboolean 1079 free_items (gpointer user_data) 1080 { 1081 GPtrArray *copy = user_data; 1082 1083 #ifdef DEBUG_EXTRA 1084 g_ptr_array_foreach (copy, (GFunc) forea, NULL); 1085 #else 1086 g_ptr_array_foreach (copy, (GFunc) g_object_unref, NULL); 1087 #endif 1088 g_ptr_array_free (copy, TRUE); 1089 1090 return FALSE; 1091 } 1092 1093 static inline void 1094 copy_them (gpointer data, gpointer user_data) { g_ptr_array_add ((GPtrArray *) user_data, data); } 1078 1095 1079 1096 static void … … 1082 1099 TnyGtkHeaderListModel *self = (TnyGtkHeaderListModel *) object; 1083 1100 TnyGtkHeaderListModelPriv *priv = TNY_GTK_HEADER_LIST_MODEL_GET_PRIVATE (self); 1101 GPtrArray *copy = g_ptr_array_new (); 1084 1102 1085 1103 g_static_rec_mutex_lock (priv->iterator_lock); … … 1096 1114 remove_del_timeouts (self); 1097 1115 1098 #ifdef DEBUG_EXTRA 1099 g_ptr_array_foreach (priv->items, (GFunc) forea, NULL); 1100 #else 1101 g_ptr_array_foreach (priv->items, (GFunc) g_object_unref, NULL); 1102 #endif 1116 g_ptr_array_foreach (priv->items, (GFunc) copy_them, copy); 1117 1118 g_timeout_add (5*1000, free_items, copy); 1119 1103 1120 1104 1121 if (priv->folder) … … 1230 1247 GtkTreeIter iter; 1231 1248 GtkTreePath *path; 1249 GPtrArray *copy_items; 1232 1250 1233 1251 g_static_rec_mutex_lock (priv->iterator_lock); … … 1245 1263 * assertion is placed there, in stead of a normal return, though) */ 1246 1264 1247 g_ptr_array_foreach (priv->items, (GFunc) g_object_unref, NULL); 1265 copy_items = priv->items; 1266 priv->registered = 0; 1267 priv->items = g_ptr_array_sized_new (tny_folder_get_all_count (folder)); 1248 1268 if (priv->folder) 1249 1269 g_object_unref (priv->folder); 1250 1270 priv->folder = TNY_FOLDER (g_object_ref (folder)); 1251 priv->registered = 0;1252 g_ptr_array_free (priv->items, TRUE);1253 priv->items = g_ptr_array_sized_new (tny_folder_get_all_count (folder));1254 1255 1271 g_static_rec_mutex_unlock (priv->iterator_lock); 1256 1272 … … 1264 1280 1265 1281 g_static_rec_mutex_lock (priv->iterator_lock); 1282 1283 g_ptr_array_foreach (copy_items, (GFunc) g_object_unref, NULL); 1284 g_ptr_array_free (copy_items, TRUE); 1266 1285 1267 1286 /* Reference the new folder instance */
