From 4663f47451132d1db0106eba2fb8cf92546d5f90 Mon Sep 17 00:00:00 2001 From: Srinivasa Ragavan Date: Thu, 16 Oct 2008 09:23:25 +0000 Subject: [PATCH] Remove console spew. 2008-10-16 Srinivasa Ragavan * 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: svn path=/trunk/; revision=9683 --- camel/ChangeLog | 8 ++++++++ camel/camel-db.c | 8 +++++--- camel/camel-folder-search.c | 4 ++-- camel/camel-store.c | 6 ++++-- camel/camel-vee-folder.c | 3 +++ camel/camel-vee-summary.c | 2 +- 6 files changed, 23 insertions(+), 8 deletions(-) diff --git a/camel/ChangeLog b/camel/ChangeLog index 2c2d24c..5a052d8 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -1,5 +1,13 @@ 2008-10-16 Srinivasa Ragavan + * 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: + +2008-10-16 Srinivasa Ragavan + ** Fix for bug #556495 * camel/camel-db.c: diff --git a/camel/camel-db.c b/camel/camel-db.c index cdae059..177b765 100644 --- a/camel/camel-db.c +++ b/camel/camel-db.c @@ -307,8 +307,9 @@ camel_db_count_message_info (CamelDB *cdb, const char *query, guint32 *count, Ca 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 @@ camel_db_select (CamelDB *cdb, const char* stmt, CamelDBSelectCB callback, gpoin 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; } diff --git a/camel/camel-folder-search.c b/camel/camel-folder-search.c index 839f217..27b7df5 100644 --- a/camel/camel-folder-search.c +++ b/camel/camel-folder-search.c @@ -489,7 +489,7 @@ camel_folder_search_count(CamelFolderSearch *search, const char *expr, CamelExce 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 @@ camel_folder_search_search(CamelFolderSearch *search, const char *expr, GPtrArra 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 */ } } diff --git a/camel/camel-store.c b/camel/camel-store.c index 9a05756..1b33a40 100644 --- a/camel/camel-store.c +++ b/camel/camel-store.c @@ -236,11 +236,13 @@ construct (CamelService *service, CamelSession *session, /* 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); diff --git a/camel/camel-vee-folder.c b/camel/camel-vee-folder.c index 431baeb..528f7e7 100644 --- a/camel/camel-vee-folder.c +++ b/camel/camel-vee-folder.c @@ -704,6 +704,9 @@ vee_search_by_expression(CamelFolder *folder, const char *expression, CamelExcep 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; diff --git a/camel/camel-vee-summary.c b/camel/camel-vee-summary.c index 2307875..fc39762 100644 --- a/camel/camel-vee-summary.c +++ b/camel/camel-vee-summary.c @@ -429,7 +429,7 @@ camel_vee_summary_add(CamelVeeSummary *s, CamelFolderSummary *summary, const cha 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; -- 2.7.4