evolution-data-server r9409 - trunk/camel



Author: sragavan
Date: Wed Aug 20 17:04:47 2008
New Revision: 9409
URL: http://svn.gnome.org/viewvc/evolution-data-server?rev=9409&view=rev

Log:
2008-08-20  Srinivasa Ragavan  <sragavan novell com>

	* camel/camel-db.c: Make use of collate function for just sorts also.


Modified:
   trunk/camel/ChangeLog
   trunk/camel/camel-db.c

Modified: trunk/camel/camel-db.c
==============================================================================
--- trunk/camel/camel-db.c	(original)
+++ trunk/camel/camel-db.c	Wed Aug 20 17:04:47 2008
@@ -154,17 +154,18 @@
 int
 camel_db_set_collate (CamelDB *cdb, const char *col, const char *collate, CamelDBCollate func)
 {
-		int ret;
+		int ret = 0;
 
 		if (!cdb)
-			return TRUE;
+			return 0;
 
 		g_mutex_lock (cdb->lock);
 		cdb->sort_by = col;
 		cdb->collate = collate;
 		cdb->collate_cb = func;
 		d(g_print("Creating Collation %s on %s with %p\n", collate, col, func));
-		ret = sqlite3_create_collation(cdb->db, collate, SQLITE_UTF8,  NULL, func);
+		if (collate && func)
+			ret = sqlite3_create_collation(cdb->db, collate, SQLITE_UTF8,  NULL, func);
 		g_mutex_unlock (cdb->lock);
 
 		return ret;



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