From: Srinivasa Ragavan Date: Thu, 7 Aug 2008 04:45:20 +0000 (+0000) Subject: Fix return values. Suppress No such table exception. X-Git-Tag: upstream/3.7.4~4731 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1a52ddcce827603524f4c50afd3fdb5e6b07d5e2;p=platform%2Fupstream%2Fevolution-data-server.git Fix return values. Suppress No such table exception. 2008-08-07 Srinivasa Ragavan * camel/camel-db.c: Fix return values. * camel/camel-folder-search.c: Suppress No such table exception. svn path=/trunk/; revision=9292 --- diff --git a/camel/ChangeLog b/camel/ChangeLog index 1b8a3b5..383563d 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -1,5 +1,10 @@ 2008-08-07 Srinivasa Ragavan + * camel/camel-db.c: Fix return values. + * camel/camel-folder-search.c: Suppress No such table exception. + +2008-08-07 Srinivasa Ragavan + * camel/camel-folder-summary.c: Store to db intelligently. 2008-08-07 Srinivasa Ragavan diff --git a/camel/camel-db.c b/camel/camel-db.c index 349ac80..45adfe8 100644 --- a/camel/camel-db.c +++ b/camel/camel-db.c @@ -415,7 +415,7 @@ camel_db_select (CamelDB *cdb, const char* stmt, CamelDBSelectCB callback, gpoin int ret = -1; if (!cdb) - return TRUE; + return ret; d(g_print ("\n%s:\n%s \n", __FUNCTION__, stmt)); g_mutex_lock (cdb->lock); diff --git a/camel/camel-folder-search.c b/camel/camel-folder-search.c index d4e0689..40fea3e 100644 --- a/camel/camel-folder-search.c +++ b/camel/camel-folder-search.c @@ -493,6 +493,13 @@ camel_folder_search_search(CamelFolderSearch *search, const char *expr, GPtrArra matches = g_ptr_array_new(); cdb = (CamelDB *) (search->folder->cdb); camel_db_select (cdb, tmp, (CamelDBSelectCB) read_uid_callback, matches, ex); + if (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); + camel_exception_clear (ex); /* Suppress no such table */ + } + } g_free (tmp); }