evolution-data-server r9673 - in branches/gnome-2-24/camel: . providers/imap
- From: sragavan svn gnome org
- To: svn-commits-list gnome org
- Subject: evolution-data-server r9673 - in branches/gnome-2-24/camel: . providers/imap
- Date: Wed, 15 Oct 2008 07:38:51 +0000 (UTC)
Author: sragavan
Date: Wed Oct 15 07:38:51 2008
New Revision: 9673
URL: http://svn.gnome.org/viewvc/evolution-data-server?rev=9673&view=rev
Log:
2008-10-15 Srinivasa Ragavan <sragavan novell com>
* camel-folder-summary.c: (perform_content_info_load_from_db),
(perform_content_info_save_to_db): Save/load Content info well in DB.
Imap cached messages aren't coming up due to this.
Modified:
branches/gnome-2-24/camel/ChangeLog
branches/gnome-2-24/camel/camel-folder-summary.c
branches/gnome-2-24/camel/providers/imap/ChangeLog
branches/gnome-2-24/camel/providers/imap/camel-imap-folder.c
branches/gnome-2-24/camel/providers/imap/camel-imap-summary.c
Modified: branches/gnome-2-24/camel/camel-folder-summary.c
==============================================================================
--- branches/gnome-2-24/camel/camel-folder-summary.c (original)
+++ branches/gnome-2-24/camel/camel-folder-summary.c Wed Oct 15 07:38:51 2008
@@ -96,7 +96,7 @@
#define EXTRACT_FIRST_STRING(val) len=strtoul (part, &part, 10); if (*part) part++; val=g_strndup (part, len); part+=len;
#define EXTRACT_STRING(val) if (*part) part++; len=strtoul (part, &part, 10); if (*part) part++; val=g_strndup (part, len); part+=len;
#define EXTRACT_FIRST_DIGIT(val) val=strtoul (part, &part, 10);
-#define EXTRACT_DIGIT(val) if (*part) part++; val=strtoul (part, &part, 10);
+#define EXTRACT_DIGIT(val) if (*part && *part == ' ') part++; val=strtoul (part, &part, 10);
/* trivial lists, just because ... */
struct _node {
@@ -660,6 +660,7 @@
guint32 count;
CamelMessageContentInfo *ci, *pci;
char *part;
+
ci = ((CamelFolderSummaryClass *)(CAMEL_OBJECT_GET_CLASS(s)))->content_info_from_db (s, mir);
if (ci == NULL)
return NULL;
@@ -1231,9 +1232,10 @@
{
CamelMessageContentInfo *part;
char *oldr;
+
if (((CamelFolderSummaryClass *)(CAMEL_OBJECT_GET_CLASS (s)))->content_info_to_db (s, ci, record) == -1)
return -1;
-
+
oldr = record->cinfo;
record->cinfo = g_strdup_printf ("%s %d", oldr, my_list_size ((struct _node **)&ci->childs));
g_free (oldr);
Modified: branches/gnome-2-24/camel/providers/imap/camel-imap-folder.c
==============================================================================
--- branches/gnome-2-24/camel/providers/imap/camel-imap-folder.c (original)
+++ branches/gnome-2-24/camel/providers/imap/camel-imap-folder.c Wed Oct 15 07:38:51 2008
@@ -2874,6 +2874,7 @@
if (body) {
/* NB: small race here, setting the info.content */
imap_parse_body ((const char **) &body, folder, mi->info.content);
+ mi->info.dirty = TRUE;
camel_folder_summary_touch (folder->summary);
}
Modified: branches/gnome-2-24/camel/providers/imap/camel-imap-summary.c
==============================================================================
--- branches/gnome-2-24/camel/providers/imap/camel-imap-summary.c (original)
+++ branches/gnome-2-24/camel/providers/imap/camel-imap-summary.c Wed Oct 15 07:38:51 2008
@@ -376,7 +376,11 @@
guint32 type=0;
if (part) {
- EXTRACT_FIRST_DIGIT (type);
+ if (*part == ' ')
+ part++;
+ if (part){
+ EXTRACT_FIRST_DIGIT (type);
+ }
}
mir->cinfo = part;
if (type)
@@ -397,11 +401,16 @@
static int
content_info_to_db (CamelFolderSummary *s, CamelMessageContentInfo *info, CamelMIRecord *mir)
{
+ char *oldr;
if (info->type) {
- mir->cinfo = g_strdup ("1");
+ oldr = mir->cinfo;
+ mir->cinfo = oldr ? g_strdup_printf("%s 1", oldr) : g_strdup ("1");
+ g_free(oldr);
return camel_imap_summary_parent->content_info_to_db (s, info, mir);
} else {
- mir->cinfo = g_strdup ("0");
+ oldr = mir->cinfo;
+ mir->cinfo = oldr ? g_strdup_printf("%s 0", oldr) : g_strdup ("0");
+ g_free(oldr);
return 0;
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]