evolution-data-server r9198 - in trunk/camel: . providers/imap



Author: sragavan
Date: Sat Jul 26 12:46:30 2008
New Revision: 9198
URL: http://svn.gnome.org/viewvc/evolution-data-server?rev=9198&view=rev

Log:
2008-07-26  Srinivasa Ragavan  <sragavan novell com>

	* camel/camel-folder-summary.c: Fix compiler warning and some crash
	possibilities.
2008-07-26  Srinivasa Ragavan  <sragavan novell com>

	* camel/providers/imap/camel-imap-folder.c: Fix compiler warnings.


Modified:
   trunk/camel/ChangeLog
   trunk/camel/camel-folder-summary.c
   trunk/camel/providers/imap/ChangeLog
   trunk/camel/providers/imap/camel-imap-folder.c

Modified: trunk/camel/camel-folder-summary.c
==============================================================================
--- trunk/camel/camel-folder-summary.c	(original)
+++ trunk/camel/camel-folder-summary.c	Sat Jul 26 12:46:30 2008
@@ -1991,14 +1991,17 @@
 		camel_folder_summary_remove(s, oldinfo);
 		camel_message_info_free(oldinfo);
 	} else {
+		char *tmpid = g_strdup (uid);
 		/* Info isn't loaded into the memory. We must just remove the UID*/
 		summary_remove_uid (s, uid);
 		CAMEL_SUMMARY_UNLOCK(s, ref_lock);
 		CAMEL_SUMMARY_UNLOCK(s, summary_lock);
 
-		if (camel_db_delete_uid (s->folder->cdb, s->folder->full_name, camel_message_info_uid(info), NULL) != 0)
+		if (camel_db_delete_uid (s->folder->cdb, s->folder->full_name, tmpid, NULL) != 0) {
+			g_free(tmpid);
 			return ;
-		
+		}
+		g_free (tmpid);
 	}
 }
 

Modified: trunk/camel/providers/imap/camel-imap-folder.c
==============================================================================
--- trunk/camel/providers/imap/camel-imap-folder.c	(original)
+++ trunk/camel/providers/imap/camel-imap-folder.c	Sat Jul 26 12:46:30 2008
@@ -1279,7 +1279,7 @@
 		CAMEL_SERVICE_REC_LOCK (store, connect_lock);
 	}
 
-	g_ptr_array_foreach (summary, camel_pstring_free, NULL);
+	g_ptr_array_foreach (summary, (GFunc) camel_pstring_free, NULL);
 	g_ptr_array_free (summary, TRUE);
 	
 	/* Save the summary */
@@ -3220,7 +3220,7 @@
 	changes = camel_folder_change_info_new ();
 	if (expunged) {
 		int i, id;
-		GList *deleted = NULL;
+		GSList *deleted = NULL;
 		
 		for (i = 0; i < expunged->len; i++) {
 			id = g_array_index (expunged, int, i);
@@ -3231,18 +3231,18 @@
 				continue;
 			}
 
-			deleted = g_list_prepend(deleted, uid);
+			deleted = g_slist_prepend(deleted, uid);
 			camel_folder_change_info_remove_uid (changes, uid);
 			CAMEL_IMAP_FOLDER_REC_LOCK (imap_folder, cache_lock);
 			camel_imap_message_cache_remove (imap_folder->cache, uid);
 			CAMEL_IMAP_FOLDER_REC_UNLOCK (imap_folder, cache_lock);
-			camel_folder_summary_remove_index_fast (CamelFolderSummary *s, id-1)
+			camel_folder_summary_remove_index_fast (folder->summary, id-1);
 		}
 		
 		/* Delete all in one transaction */
 		camel_db_delete_uids (folder->cdb, folder->full_name, deleted, ex);
-		g_list_foreach (deleted, g_free);
-		g_list_free (deleted);
+		g_slist_foreach (deleted, (GFunc) g_free, NULL);
+		g_slist_free (deleted);
 	}
 
 	len = camel_folder_summary_count (folder->summary);



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