evolution-data-server r9682 - branches/gnome-2-24/camel



Author: sragavan
Date: Thu Oct 16 09:23:13 2008
New Revision: 9682
URL: http://svn.gnome.org/viewvc/evolution-data-server?rev=9682&view=rev

Log:
2008-10-16  Srinivasa Ragavan  <sragavan novell com>

	* camel/camel-db.c: Remove console spew.
	* camel/camel-folder-search.c:
	* camel/camel-store.c:
	* camel/camel-vee-folder.c:
	* camel/camel-vee-summary.c:




Modified:
   branches/gnome-2-24/camel/ChangeLog
   branches/gnome-2-24/camel/camel-db.c
   branches/gnome-2-24/camel/camel-folder-search.c
   branches/gnome-2-24/camel/camel-store.c
   branches/gnome-2-24/camel/camel-vee-folder.c
   branches/gnome-2-24/camel/camel-vee-summary.c

Modified: branches/gnome-2-24/camel/camel-db.c
==============================================================================
--- branches/gnome-2-24/camel/camel-db.c	(original)
+++ branches/gnome-2-24/camel/camel-db.c	Thu Oct 16 09:23:13 2008
@@ -307,8 +307,9 @@
 	CAMEL_DB_RELEASE_SQLITE_MEMORY;
 		
 	if (ret != SQLITE_OK) {
-		g_print ("Error in SQL SELECT statement: %s [%s]\n", query, errmsg);
-		camel_exception_set (ex, CAMEL_EXCEPTION_SYSTEM, _(errmsg));
+		d(g_print ("Error in SQL SELECT statement: %s [%s]\n", query, errmsg));
+		if (ex)
+			camel_exception_set (ex, CAMEL_EXCEPTION_SYSTEM, _(errmsg));
 		sqlite3_free (errmsg);
 		errmsg = NULL;
 	}
@@ -473,7 +474,8 @@
 		
   	if (ret != SQLITE_OK) {
     		d(g_warning ("Error in select statement '%s' [%s].\n", stmt, errmsg));
-		camel_exception_set (ex, CAMEL_EXCEPTION_SYSTEM, errmsg);
+		if (ex)
+			camel_exception_set (ex, CAMEL_EXCEPTION_SYSTEM, errmsg);
 		sqlite3_free (errmsg);
 		errmsg = NULL;
   	}

Modified: branches/gnome-2-24/camel/camel-folder-search.c
==============================================================================
--- branches/gnome-2-24/camel/camel-folder-search.c	(original)
+++ branches/gnome-2-24/camel/camel-folder-search.c	Thu Oct 16 09:23:13 2008
@@ -489,7 +489,7 @@
 		if (ex && camel_exception_is_set(ex)) {
 			const char *exception = camel_exception_get_description (ex);
 			if (strncmp(exception, "no such table", 13) == 0) {
-				g_warning ("Error during searching %s: %s\n", tmp, exception);
+				d(g_warning ("Error during searching %s: %s\n", tmp, exception));
 				camel_exception_clear (ex); /* Suppress no such table */
 			}
 		}
@@ -629,7 +629,7 @@
 		if (ex && camel_exception_is_set(ex)) {
 			const char *exception = camel_exception_get_description (ex);
 			if (strncmp(exception, "no such table", 13) == 0) {
-				g_warning ("Error during searching %s: %s\n", tmp, exception);
+				d(g_warning ("Error during searching %s: %s\n", tmp, exception));
 				camel_exception_clear (ex); /* Suppress no such table */
 			}
 		}

Modified: branches/gnome-2-24/camel/camel-store.c
==============================================================================
--- branches/gnome-2-24/camel/camel-store.c	(original)
+++ branches/gnome-2-24/camel/camel-store.c	Thu Oct 16 09:23:13 2008
@@ -236,11 +236,13 @@
 
 	/* This is for reading from the store */
 	store->cdb_r = camel_db_open (store_db_path, ex);
-	printf("store_db_path %s\n", store_db_path);
+	if (camel_debug("sqlite"))
+		printf("store_db_path %s\n", store_db_path);
 	if (camel_exception_is_set (ex)) {
 		char *store_path;
 		
-		g_print ("Failure for store_db_path : [%s]\n", store_db_path);
+		if (camel_debug("sqlite"))
+			g_print ("Failure for store_db_path : [%s]\n", store_db_path);
 		g_free (store_db_path);		
 
 		store_path =  camel_session_get_storage_path (session, service, ex);

Modified: branches/gnome-2-24/camel/camel-vee-folder.c
==============================================================================
--- branches/gnome-2-24/camel/camel-vee-folder.c	(original)
+++ branches/gnome-2-24/camel/camel-vee-folder.c	Thu Oct 16 09:23:13 2008
@@ -704,6 +704,9 @@
 		if (g_hash_table_lookup(searched, f) == NULL) {
 			camel_vee_folder_hash_folder(f, hash);
 			matches = camel_folder_search_by_expression(f, expr, ex);
+			if (camel_exception_is_set(ex) && strncmp(camel_exception_get_description(ex), "no such table", 13)) {
+				camel_exception_clear(ex);
+			}
 			if (matches) {
 				for (i = 0; i < matches->len; i++) {
 					char *uid = matches->pdata[i], *vuid;

Modified: branches/gnome-2-24/camel/camel-vee-summary.c
==============================================================================
--- branches/gnome-2-24/camel/camel-vee-summary.c	(original)
+++ branches/gnome-2-24/camel/camel-vee-summary.c	Thu Oct 16 09:23:13 2008
@@ -428,7 +428,7 @@
 
 	if (mi) {
 		/* Possible that the entry is loaded, see if it has the summary */
-		g_message ("%s - already there\n", vuid);
+		d(g_message ("%s - already there\n", vuid));
 		g_free (vuid);
 		if (!mi->summary) {
 			mi->summary = summary;



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