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:
+
+2008-10-16 Srinivasa Ragavan <sragavan@novell.com>
+
** Fix for bug #556495
* camel/camel-db.c:
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;
}
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;
}
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 */
}
}
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 */
}
}
/* 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);
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;
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;