evolution-data-server r8910 - branches/camel-db-summary/camel
- From: psankar svn gnome org
- To: svn-commits-list gnome org
- Subject: evolution-data-server r8910 - branches/camel-db-summary/camel
- Date: Wed, 4 Jun 2008 08:23:48 +0000 (UTC)
Author: psankar
Date: Wed Jun 4 08:23:48 2008
New Revision: 8910
URL: http://svn.gnome.org/viewvc/evolution-data-server?rev=8910&view=rev
Log:
count (msginfo) will fail the first time. but nothing to be worried of
Modified:
branches/camel-db-summary/camel/camel-db.c
branches/camel-db-summary/camel/camel-folder-summary.c
Modified: branches/camel-db-summary/camel/camel-db.c
==============================================================================
--- branches/camel-db-summary/camel/camel-db.c (original)
+++ branches/camel-db-summary/camel/camel-db.c Wed Jun 4 08:23:48 2008
@@ -278,7 +278,7 @@
return TRUE;
ret = sqlite3_exec(cdb->db, stmt, callback, data, &errmsg);
- if(ret != SQLITE_OK) {
+ if (ret != SQLITE_OK) {
d(g_warning ("Error in select statement '%s' [%s].\n", stmt, errmsg));
camel_exception_set (ex, CAMEL_EXCEPTION_SYSTEM, errmsg);
sqlite3_free (errmsg);
Modified: branches/camel-db-summary/camel/camel-folder-summary.c
==============================================================================
--- branches/camel-db-summary/camel/camel-folder-summary.c (original)
+++ branches/camel-db-summary/camel/camel-folder-summary.c Wed Jun 4 08:23:48 2008
@@ -1882,14 +1882,15 @@
record->nextuid = s->nextuid;
record->time = s->time;
- if (camel_db_count_total_message_info (db, table_name, &(record->saved_count), ex))
- return NULL;
- if (camel_db_count_junk_message_info (db, table_name, &(record->junk_count), ex))
- return NULL;
- if (camel_db_count_deleted_message_info (db, table_name, &(record->deleted_count), ex))
- return NULL;
- if (camel_db_count_unread_message_info (db, table_name, &(record->unread_count), ex))
- return NULL;
+ /* FIXME: Ever heard of Constructors and initializing ? */
+ if (camel_db_count_total_message_info (db, table_name, &(record->saved_count), NULL))
+ record->saved_count = 0;
+ if (camel_db_count_junk_message_info (db, table_name, &(record->junk_count), NULL))
+ record->junk_count = 0;
+ if (camel_db_count_deleted_message_info (db, table_name, &(record->deleted_count), NULL))
+ record->deleted_count = 0;
+ if (camel_db_count_unread_message_info (db, table_name, &(record->unread_count), NULL))
+ record->unread_count = 0;
return record;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]