evolution-data-server r8409 - trunk/camel/providers/local
- From: sragavan svn gnome org
- To: svn-commits-list gnome org
- Subject: evolution-data-server r8409 - trunk/camel/providers/local
- Date: Thu, 24 Jan 2008 01:34:54 +0000 (GMT)
Author: sragavan
Date: Thu Jan 24 01:34:53 2008
New Revision: 8409
URL: http://svn.gnome.org/viewvc/evolution-data-server?rev=8409&view=rev
Log:
2008-01-22 Srinivasa Ragavan <sragavan novell com>
** Fix for bug #450840
* camel-mbox-folder.c: (mbox_get_message): A corrupted summary that
would get fine in next sync. So lets not crash if a message is not
there.
2008-01-22 Srinivasa Ragavan <sragavan novell com>
** Fix for bug #482940
* camel-maildir-summary.c: (camel_maildir_summary_init),
(camel_maildir_summary_finalise), (maildir_summary_check): Make the
maildir summary check thread safe. May be needed for other functions
too.
Modified:
trunk/camel/providers/local/ChangeLog
trunk/camel/providers/local/camel-maildir-summary.c
trunk/camel/providers/local/camel-mbox-folder.c
Modified: trunk/camel/providers/local/camel-maildir-summary.c
==============================================================================
--- trunk/camel/providers/local/camel-maildir-summary.c (original)
+++ trunk/camel/providers/local/camel-maildir-summary.c Thu Jan 24 01:34:53 2008
@@ -72,6 +72,7 @@
char *hostname;
GHashTable *load_map;
+ GMutex *summary_lock;
};
static CamelLocalSummaryClass *parent_class;
@@ -138,6 +139,7 @@
} else {
o->priv->hostname = g_strdup("localhost");
}
+ o->priv->summary_lock = g_mutex_new ();
}
static void
@@ -146,6 +148,7 @@
CamelMaildirSummary *o = (CamelMaildirSummary *)obj;
g_free(o->priv->hostname);
+ g_mutex_free (o->priv->summary_lock);
g_free(o->priv);
}
@@ -547,6 +550,8 @@
char *uid;
struct _remove_data rd = { cls, changes };
+ g_mutex_lock (((CamelMaildirSummary *) cls)->priv->summary_lock);
+
new = g_strdup_printf("%s/new", cls->folder_path);
cur = g_strdup_printf("%s/cur", cls->folder_path);
@@ -564,6 +569,7 @@
g_free(cur);
g_free(new);
camel_operation_end(NULL);
+ g_mutex_unlock (((CamelMaildirSummary *) cls)->priv->summary_lock);
return -1;
}
@@ -723,6 +729,8 @@
qsort(s->messages->pdata, s->messages->len, sizeof(CamelMessageInfo *), sort_receive_cmp);
CAMEL_SUMMARY_UNLOCK(s, summary_lock);
+ g_mutex_unlock (((CamelMaildirSummary *) cls)->priv->summary_lock);
+
return 0;
}
Modified: trunk/camel/providers/local/camel-mbox-folder.c
==============================================================================
--- trunk/camel/providers/local/camel-mbox-folder.c (original)
+++ trunk/camel/providers/local/camel-mbox-folder.c Thu Jan 24 01:34:53 2008
@@ -349,8 +349,10 @@
goto fail;
}
- /* no frompos, its an error in the library (and we can't do anything with it) */
- g_assert(info->frompos != -1);
+ if (info->frompos == -1) {
+ camel_message_info_free((CamelMessageInfo *)info);
+ goto fail;
+ }
frompos = info->frompos;
camel_message_info_free((CamelMessageInfo *)info);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]