[evolution-exchange] Define its own compare function for UIDs.



commit c1362a3c5c1537df99d29c7edd2b7d38b1bf2897
Author: Milan Crha <mcrha redhat com>
Date:   Fri Apr 24 20:34:51 2009 +0200

    Define its own compare function for UIDs.
    
    	** Part of fix for bug #563954
---
 ChangeLog                     |    7 +++++++
 camel/camel-exchange-folder.c |   10 ++++++++++
 2 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index e7c5024..558cb94 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2009-04-24  Milan Crha  <mcrha redhat com>
+
+	** Part of fix for bug #563954
+
+	* camel/camel-exchange-folder.c: (cmp_uids), (class_init):
+	Define its own compare function for UIDs.
+
 2009-03-16  Srinivasa Ragavan  <sragavan novell com>
 
 	* NEWS: Evolution Exchange 2.26.0 release and version bump
diff --git a/camel/camel-exchange-folder.c b/camel/camel-exchange-folder.c
index 19b1210..1e0d0aa 100644
--- a/camel/camel-exchange-folder.c
+++ b/camel/camel-exchange-folder.c
@@ -86,6 +86,7 @@ static void   transfer_messages_the_hard_way (CamelFolder *source,
 static void refresh_info (CamelFolder *folder, CamelException *ex);
 static void exchange_sync (CamelFolder *folder, gboolean expunge, CamelException *ex);
 static char* get_filename (CamelFolder *folder, const char *uid, CamelException *ex);
+static gint cmp_uids (CamelFolder *folder, const char *uid1, const char *uid2);
 
 static void
 class_init (CamelFolderClass *camel_folder_class)
@@ -99,6 +100,7 @@ class_init (CamelFolderClass *camel_folder_class)
 	camel_folder_class->search_by_expression = search_by_expression;
 	camel_folder_class->count_by_expression = count_by_expression;
 
+	camel_folder_class->cmp_uids = cmp_uids;
 	camel_folder_class->search_by_uids = search_by_uids;
 	/* use the default function for the search_free */
 	/* camel_folder_class->search_free = search_free; */
@@ -506,6 +508,14 @@ count_by_expression (CamelFolder *folder, const char *expression,
 	return matches;
 }
 
+static gint
+cmp_uids (CamelFolder *folder, const char *uid1, const char *uid2)
+{
+	g_return_val_if_fail (uid1 != NULL, 0);
+	g_return_val_if_fail (uid2 != NULL, 0);
+
+	return strcmp (uid1, uid2);
+}
 
 static GPtrArray *
 search_by_uids (CamelFolder *folder, const char *expression,



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