Merge several bug fixed from upstream (memory corruption, memory leaks...).

This commit is contained in:
ajacoutot 2013-04-12 05:46:15 +00:00
parent bf1f34e302
commit 203985edc6
10 changed files with 648 additions and 2 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.135 2013/04/01 16:26:59 ajacoutot Exp $
# $OpenBSD: Makefile,v 1.136 2013/04/12 05:46:15 ajacoutot Exp $
SHARED_ONLY= Yes
@ -6,7 +6,7 @@ COMMENT= unified backend for PIM programs
GNOME_PROJECT= evolution-data-server
GNOME_VERSION= 3.8.0
REVISION= 0
REVISION= 1
CATEGORIES= databases productivity

View File

@ -0,0 +1,48 @@
$OpenBSD: patch-addressbook_libebook_e-book-client_c,v 1.1 2013/04/12 05:46:16 ajacoutot Exp $
From b4bec35511b7fe811eb544be9c8b05e92f230e69 Mon Sep 17 00:00:00 2001
From: Matthew Barnes <mbarnes@redhat.com>
Date: Tue, 02 Apr 2013 13:53:08 +0000
Subject: EBookClient: Use G_DBUS_MESSAGE_FLAGS_NO_REPLY_EXPECTED for close().
--- addressbook/libebook/e-book-client.c.orig Sun Mar 17 13:46:02 2013
+++ addressbook/libebook/e-book-client.c Fri Apr 12 07:12:54 2013
@@ -494,22 +494,6 @@ book_client_name_vanished_cb (GDBusConnection *connect
}
static void
-book_client_close_cb (GObject *source_object,
- GAsyncResult *result,
- gpointer user_data)
-{
- GError *error = NULL;
-
- e_dbus_address_book_call_close_finish (
- E_DBUS_ADDRESS_BOOK (source_object), result, &error);
-
- if (error != NULL) {
- g_warning ("%s: %s", G_STRFUNC, error->message);
- g_error_free (error);
- }
-}
-
-static void
book_client_dispose (GObject *object)
{
EBookClientPrivate *priv;
@@ -531,11 +515,11 @@ book_client_dispose (GObject *object)
}
if (priv->dbus_proxy != NULL) {
- /* Call close() asynchronously
- * so we don't block dispose(). */
+ /* Call close() asynchronously so we don't block dispose().
+ * Also omit a callback function, so the GDBusMessage uses
+ * G_DBUS_MESSAGE_FLAGS_NO_REPLY_EXPECTED. */
e_dbus_address_book_call_close (
- priv->dbus_proxy, NULL,
- book_client_close_cb, NULL);
+ priv->dbus_proxy, NULL, NULL, NULL);
g_object_unref (priv->dbus_proxy);
priv->dbus_proxy = NULL;
}

View File

@ -0,0 +1,18 @@
$OpenBSD: patch-addressbook_libedata-book_e-book-backend-sqlitedb_c,v 1.1 2013/04/12 05:46:16 ajacoutot Exp $
From b7d2bd5c42ecad7b2c07ceaa95b863d539a47893 Mon Sep 17 00:00:00 2001
From: Patrick Ohly <patrick.ohly@intel.com>
Date: Wed, 03 Apr 2013 14:45:28 +0000
Subject: sqlite addressbook: fix memory corruption in get_revision
--- addressbook/libedata-book/e-book-backend-sqlitedb.c.orig Sun Mar 17 13:46:02 2013
+++ addressbook/libedata-book/e-book-backend-sqlitedb.c Fri Apr 12 07:13:31 2013
@@ -4068,7 +4068,7 @@ e_book_backend_sqlitedb_get_revision (EBookBackendSqli
stmt = sqlite3_mprintf (
"SELECT revision FROM folders WHERE folder_id = %Q", folderid);
success = book_backend_sql_exec (
- ebsdb->priv->db, stmt, get_string_cb, &revision_out, error);
+ ebsdb->priv->db, stmt, get_string_cb, revision_out, error);
sqlite3_free (stmt);
UNLOCK_MUTEX (&ebsdb->priv->lock);

View File

@ -0,0 +1,210 @@
$OpenBSD: patch-calendar_backends_file_e-cal-backend-file_c,v 1.1 2013/04/12 05:46:16 ajacoutot Exp $
From cdf339bc1eb71d9f66bee521766da4fe47841775 Mon Sep 17 00:00:00 2001
From: Matthew Barnes <mbarnes@redhat.com>
Date: Thu, 11 Apr 2013 13:45:24 +0000
Subject: ECalBackendFile: Indentation cleanups.
From daf4b3e7f6d284ed7548fbd390b4b1eba88d21ec Mon Sep 17 00:00:00 2001
From: Matthew Barnes <mbarnes@redhat.com>
Date: Mon, 08 Apr 2013 18:09:13 +0000
Subject: CamelIMAPXServer: Rewrite duplicate message fetching
--- calendar/backends/file/e-cal-backend-file.c.orig Fri Apr 12 07:17:45 2013
+++ calendar/backends/file/e-cal-backend-file.c Fri Apr 12 07:17:47 2013
@@ -381,77 +381,81 @@ uid_in_use (ECalBackendFile *cbfile,
static icalproperty *
get_revision_property (ECalBackendFile *cbfile)
{
- ECalBackendFilePrivate *priv;
- icalproperty *prop;
+ icalproperty *prop = NULL;
- priv = cbfile->priv;
- prop = icalcomponent_get_first_property (priv->icalcomp, ICAL_X_PROPERTY);
+ if (cbfile->priv->icalcomp != NULL)
+ prop = icalcomponent_get_first_property (
+ cbfile->priv->icalcomp, ICAL_X_PROPERTY);
- while (prop != NULL) {
- const gchar *name = icalproperty_get_x_name (prop);
+ while (prop != NULL) {
+ const gchar *name = icalproperty_get_x_name (prop);
- if (name && strcmp (name, ECAL_REVISION_X_PROP) == 0)
- return prop;
+ if (name && strcmp (name, ECAL_REVISION_X_PROP) == 0)
+ return prop;
- prop = icalcomponent_get_next_property (priv->icalcomp, ICAL_X_PROPERTY);
- }
+ prop = icalcomponent_get_next_property (
+ cbfile->priv->icalcomp, ICAL_X_PROPERTY);
+ }
- return NULL;
+ return NULL;
}
static gchar *
make_revision_string (ECalBackendFile *cbfile)
{
- GTimeVal timeval;
- gchar *datestr;
- gchar *revision;
+ GTimeVal timeval;
+ gchar *datestr;
+ gchar *revision;
- g_get_current_time (&timeval);
+ g_get_current_time (&timeval);
- datestr = g_time_val_to_iso8601 (&timeval);
- revision = g_strdup_printf ("%s(%d)", datestr, cbfile->priv->revision_counter++);
+ datestr = g_time_val_to_iso8601 (&timeval);
+ revision = g_strdup_printf ("%s(%d)", datestr, cbfile->priv->revision_counter++);
- g_free (datestr);
- return revision;
+ g_free (datestr);
+ return revision;
}
static icalproperty *
ensure_revision (ECalBackendFile *cbfile)
{
- icalproperty * prop;
+ icalproperty *prop;
- prop = get_revision_property (cbfile);
+ if (cbfile->priv->icalcomp == NULL)
+ return NULL;
- if (!prop) {
- gchar *revision = make_revision_string (cbfile);
+ prop = get_revision_property (cbfile);
- prop = icalproperty_new (ICAL_X_PROPERTY);
+ if (prop == NULL) {
+ gchar *revision = make_revision_string (cbfile);
- icalproperty_set_x_name (prop, ECAL_REVISION_X_PROP);
- icalproperty_set_x (prop, revision);
+ prop = icalproperty_new (ICAL_X_PROPERTY);
- icalcomponent_add_property (cbfile->priv->icalcomp, prop);
+ icalproperty_set_x_name (prop, ECAL_REVISION_X_PROP);
+ icalproperty_set_x (prop, revision);
- g_free (revision);
- }
+ icalcomponent_add_property (cbfile->priv->icalcomp, prop);
- return prop;
+ g_free (revision);
+ }
+
+ return prop;
}
static void
bump_revision (ECalBackendFile *cbfile)
{
- /* Update the revision string */
- icalproperty *prop = ensure_revision (cbfile);
- gchar *revision = make_revision_string (cbfile);
+ /* Update the revision string */
+ icalproperty *prop = ensure_revision (cbfile);
+ gchar *revision = make_revision_string (cbfile);
- icalproperty_set_x (prop, revision);
+ icalproperty_set_x (prop, revision);
- e_cal_backend_notify_property_changed (E_CAL_BACKEND (cbfile),
+ e_cal_backend_notify_property_changed (E_CAL_BACKEND (cbfile),
CAL_BACKEND_PROPERTY_REVISION,
revision);
- g_free (revision);
+ g_free (revision);
}
/* Calendar backend methods */
@@ -509,13 +513,11 @@ e_cal_backend_file_get_backend_property (ECalBackendSy
*prop_value = e_cal_component_get_as_string (comp);
g_object_unref (comp);
} else if (g_str_equal (prop_name, CAL_BACKEND_PROPERTY_REVISION)) {
- icalproperty *prop;
- const gchar *revision;
+ icalproperty *prop;
- prop = ensure_revision (E_CAL_BACKEND_FILE (backend));
- revision = icalproperty_get_x (prop);
-
- *prop_value = g_strdup (revision);
+ /* This returns NULL if backend lacks an icalcomp. */
+ prop = ensure_revision (E_CAL_BACKEND_FILE (backend));
+ *prop_value = g_strdup (icalproperty_get_x (prop));
} else {
processed = FALSE;
}
@@ -1066,6 +1068,23 @@ free_refresh_data (ECalBackendFile *cbfile)
g_mutex_unlock (&priv->refresh_lock);
}
+static void
+cal_backend_file_take_icalcomp (ECalBackendFile *cbfile,
+ icalcomponent *icalcomp)
+{
+ icalproperty *prop;
+
+ g_warn_if_fail (cbfile->priv->icalcomp == NULL);
+ cbfile->priv->icalcomp = icalcomp;
+
+ prop = ensure_revision (cbfile);
+
+ e_cal_backend_notify_property_changed (
+ E_CAL_BACKEND (cbfile),
+ CAL_BACKEND_PROPERTY_REVISION,
+ icalproperty_get_x (prop));
+}
+
/* Parses an open iCalendar file and loads it into the backend */
static void
open_cal (ECalBackendFile *cbfile,
@@ -1096,7 +1115,7 @@ open_cal (ECalBackendFile *cbfile,
return;
}
- priv->icalcomp = icalcomp;
+ cal_backend_file_take_icalcomp (cbfile, icalcomp);
priv->path = uri_to_path (E_CAL_BACKEND (cbfile));
priv->comp_uid_hash = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, free_object_data);
@@ -1233,7 +1252,7 @@ reload_cal (ECalBackendFile *cbfile,
free_calendar_data (cbfile);
- priv->icalcomp = icalcomp;
+ cal_backend_file_take_icalcomp (cbfile, icalcomp);
priv->comp_uid_hash = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, free_object_data);
priv->interval_tree = e_intervaltree_new ();
@@ -1257,6 +1276,7 @@ create_cal (ECalBackendFile *cbfile,
{
gchar *dirname;
ECalBackendFilePrivate *priv;
+ icalcomponent *icalcomp;
free_refresh_data (cbfile);
@@ -1273,7 +1293,8 @@ create_cal (ECalBackendFile *cbfile,
g_free (dirname);
/* Create the new calendar information */
- priv->icalcomp = e_cal_util_new_top_level ();
+ icalcomp = e_cal_util_new_top_level ();
+ cal_backend_file_take_icalcomp (cbfile, icalcomp);
/* Create our internal data */
priv->comp_uid_hash = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, free_object_data);

View File

@ -0,0 +1,48 @@
$OpenBSD: patch-calendar_libecal_e-cal-client_c,v 1.1 2013/04/12 05:46:16 ajacoutot Exp $
From 23215305a7c63e1e30692e9b96c348571370c9eb Mon Sep 17 00:00:00 2001
From: Matthew Barnes <mbarnes@redhat.com>
Date: Tue, 02 Apr 2013 14:25:50 +0000
Subject: ECalClient: Use G_DBUS_MESSAGE_FLAGS_NO_REPLY_EXPECTED for close().
--- calendar/libecal/e-cal-client.c.orig Sun Mar 17 13:46:02 2013
+++ calendar/libecal/e-cal-client.c Fri Apr 12 07:13:13 2013
@@ -711,22 +711,6 @@ cal_client_name_vanished_cb (GDBusConnection *connecti
}
static void
-cal_client_close_cb (GObject *source_object,
- GAsyncResult *result,
- gpointer user_data)
-{
- GError *error = NULL;
-
- e_dbus_calendar_call_close_finish (
- E_DBUS_CALENDAR (source_object), result, &error);
-
- if (error != NULL) {
- g_warning ("%s: %s", G_STRFUNC, error->message);
- g_error_free (error);
- }
-}
-
-static void
cal_client_set_source_type (ECalClient *cal_client,
ECalClientSourceType source_type)
{
@@ -810,11 +794,11 @@ cal_client_dispose (GObject *object)
}
if (priv->dbus_proxy != NULL) {
- /* Call close() asynchronously
- * so we don't block dispose(). */
+ /* Call close() asynchronously so we don't block dispose().
+ * Also omit a callback function, so the GDBusMessage uses
+ * G_DBUS_MESSAGE_FLAGS_NO_REPLY_EXPECTED. */
e_dbus_calendar_call_close (
- priv->dbus_proxy, NULL,
- cal_client_close_cb, NULL);
+ priv->dbus_proxy, NULL, NULL, NULL);
g_object_unref (priv->dbus_proxy);
priv->dbus_proxy = NULL;
}

View File

@ -0,0 +1,159 @@
$OpenBSD: patch-camel_camel-imapx-server_c,v 1.1 2013/04/12 05:46:16 ajacoutot Exp $
From d3e1fe4060015aa1aac4bfe730a49f0de05b3c38 Mon Sep 17 00:00:00 2001
From: Milan Crha <mcrha@redhat.com>
Date: Mon, 25 Mar 2013 13:42:20 +0000
Subject: Bug #656488 - imapx: Memory leak of mi->server_user_flags
From 165ac075653ee1302f4d7811fd532fff351423dd Mon Sep 17 00:00:00 2001
From: Milan Crha <mcrha@redhat.com>
Date: Mon, 25 Mar 2013 13:33:04 +0000
Subject: Bug #695915 - IMAP alert is not displayed
--- camel/camel-imapx-server.c.orig Fri Apr 12 07:12:18 2013
+++ camel/camel-imapx-server.c Fri Apr 12 07:14:01 2013
@@ -339,6 +339,9 @@ struct _CamelIMAPXServerPrivate {
* when finished and reset the pointer to NULL. */
GArray *search_results;
GMutex search_results_lock;
+
+ GHashTable *known_alerts;
+ GMutex known_alerts_lock;
};
enum {
@@ -2324,6 +2327,9 @@ imapx_untagged_bye (CamelIMAPXServer *is,
error, CAMEL_IMAPX_ERROR, 1,
"IMAP server said BYE: %s", token);
}
+
+ g_free (token);
+
is->state = IMAPX_SHUTDOWN;
return FALSE;
@@ -2415,6 +2421,37 @@ imapx_untagged_ok_no_bad (CamelIMAPXServer *is,
break;
case IMAPX_ALERT:
c (is->tagprefix, "ALERT!: %s\n", is->priv->context->sinfo->text);
+ g_mutex_lock (&is->priv->known_alerts_lock);
+
+ if (is->priv->context->sinfo->text &&
+ !g_hash_table_lookup (is->priv->known_alerts, is->priv->context->sinfo->text)) {
+ CamelIMAPXStore *store;
+
+ store = camel_imapx_server_ref_store (is);
+ if (store) {
+ const gchar *alert = is->priv->context->sinfo->text;
+ gchar *msg;
+ CamelService *service;
+ CamelSession *session;
+
+ g_hash_table_insert (is->priv->known_alerts, g_strdup (alert), GINT_TO_POINTER (1));
+
+ service = CAMEL_SERVICE (store);
+ session = camel_service_get_session (service);
+
+ msg = g_strdup_printf (
+ _("Alert from IMAP server %s:\n%s"),
+ camel_service_get_display_name (service), alert);
+ camel_session_alert_user (
+ session, CAMEL_SESSION_ALERT_WARNING,
+ msg, NULL, cancellable);
+ g_free (msg);
+
+ g_object_unref (store);
+ }
+ }
+
+ g_mutex_unlock (&is->priv->known_alerts_lock);
break;
case IMAPX_PARSE:
c (is->tagprefix, "PARSE: %s\n", is->priv->context->sinfo->text);
@@ -7129,8 +7166,6 @@ imapx_server_finalize (GObject *object)
g_rec_mutex_clear (&is->queue_lock);
g_mutex_clear (&is->select_lock);
- g_mutex_clear (&is->fetch_mutex);
- g_cond_clear (&is->fetch_cond);
camel_folder_change_info_free (is->changes);
@@ -7141,6 +7176,9 @@ imapx_server_finalize (GObject *object)
g_array_unref (is->priv->search_results);
g_mutex_clear (&is->priv->search_results_lock);
+ g_hash_table_destroy (is->priv->known_alerts);
+ g_mutex_clear (&is->priv->known_alerts_lock);
+
/* Chain up to parent's finalize() method. */
G_OBJECT_CLASS (camel_imapx_server_parent_class)->finalize (object);
}
@@ -7238,6 +7276,7 @@ camel_imapx_server_init (CamelIMAPXServer *is)
g_mutex_init (&is->priv->stream_lock);
g_mutex_init (&is->priv->search_results_lock);
+ g_mutex_init (&is->priv->known_alerts_lock);
is->queue = camel_imapx_command_queue_new ();
is->active = camel_imapx_command_queue_new ();
@@ -7258,8 +7297,7 @@ camel_imapx_server_init (CamelIMAPXServer *is)
is->changes = camel_folder_change_info_new ();
is->parser_quit = FALSE;
- g_mutex_init (&is->fetch_mutex);
- g_cond_init (&is->fetch_cond);
+ is->priv->known_alerts = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
}
CamelIMAPXServer *
@@ -7389,32 +7427,16 @@ imapx_server_get_message (CamelIMAPXServer *is,
QUEUE_LOCK (is);
if ((job = imapx_is_job_in_queue (is, folder, IMAPX_JOB_GET_MESSAGE, uid))) {
+ /* Promote the existing GET_MESSAGE
+ * job's priority if ours is higher. */
if (pri > job->pri)
job->pri = pri;
- /* Wait for the job to finish. This would be so much nicer if
- * we could just use the queue lock with a GCond, but instead
- * we have to use a GMutex. I miss the kernel waitqueues. */
- do {
- gint this;
-
- g_mutex_lock (&is->fetch_mutex);
- this = is->fetch_count;
-
- QUEUE_UNLOCK (is);
-
- while (is->fetch_count == this)
- g_cond_wait (&is->fetch_cond, &is->fetch_mutex);
-
- g_mutex_unlock (&is->fetch_mutex);
-
- QUEUE_LOCK (is);
-
- } while (imapx_is_job_in_queue (is, folder,
- IMAPX_JOB_GET_MESSAGE, uid));
-
QUEUE_UNLOCK (is);
+ /* Wait for the job to finish. */
+ camel_imapx_job_wait (job);
+
stream = camel_data_cache_get (
ifolder->cache, "cur", uid, error);
if (stream == NULL)
@@ -7463,11 +7485,6 @@ imapx_server_get_message (CamelIMAPXServer *is,
stream = g_object_ref (data->stream);
camel_imapx_job_unref (job);
-
- g_mutex_lock (&is->fetch_mutex);
- is->fetch_count++;
- g_cond_broadcast (&is->fetch_cond);
- g_mutex_unlock (&is->fetch_mutex);
return stream;
}

View File

@ -0,0 +1,21 @@
$OpenBSD: patch-camel_camel-imapx-server_h,v 1.1 2013/04/12 05:46:16 ajacoutot Exp $
From 165ac075653ee1302f4d7811fd532fff351423dd Mon Sep 17 00:00:00 2001
From: Milan Crha <mcrha@redhat.com>
Date: Mon, 25 Mar 2013 13:33:04 +0000
Subject: Bug #695915 - IMAP alert is not displayed
--- camel/camel-imapx-server.h.orig Sun Mar 17 13:46:02 2013
+++ camel/camel-imapx-server.h Fri Apr 12 07:14:01 2013
@@ -159,11 +159,6 @@ struct _CamelIMAPXServer {
gboolean use_idle;
gboolean use_qresync;
-
- /* used to synchronize duplicate get_message requests */
- GCond fetch_cond;
- GMutex fetch_mutex;
- gint fetch_count;
};
struct _CamelIMAPXServerClass {

View File

@ -0,0 +1,42 @@
$OpenBSD: patch-camel_camel-imapx-store_c,v 1.1 2013/04/12 05:46:16 ajacoutot Exp $
From 7a52e0c602ee3356e4a0c716b9f35b9985f81e03 Mon Sep 17 00:00:00 2001
From: Milan Crha <mcrha@redhat.com>
Date: Mon, 25 Mar 2013 13:21:42 +0000
Subject: Bug #693101 - IMAPx can vanish and redownload folder summary
--- camel/camel-imapx-store.c.orig Sun Mar 17 13:46:02 2013
+++ camel/camel-imapx-store.c Fri Apr 12 07:11:41 2013
@@ -1132,11 +1132,30 @@ sync_folders (CamelIMAPXStore *istore,
GHashTable *folders_from_server;
gboolean notify_all;
gint i, total;
+ GError *local_error = NULL;
folders_from_server = fetch_folders_for_namespaces (
- istore, pattern, sync, cancellable, error);
- if (folders_from_server == NULL)
+ istore, pattern, sync, cancellable, &local_error);
+ if (folders_from_server == NULL) {
+ if (local_error)
+ g_propagate_error (error, local_error);
return FALSE;
+ }
+
+ /* In certain situations can happen that the function returns data,
+ even either the operation was cancelled or an error was set,
+ thus check for this and do not update local list of folders
+ with incomplete data
+ */
+ if (g_cancellable_is_cancelled (cancellable) || local_error) {
+ g_hash_table_foreach (folders_from_server, imapx_get_folders_free, NULL);
+ g_hash_table_destroy (folders_from_server);
+
+ if (local_error)
+ g_propagate_error (error, local_error);
+
+ return FALSE;
+ }
settings = camel_service_ref_settings (CAMEL_SERVICE (istore));
notify_all = !camel_imapx_settings_get_use_subscriptions (CAMEL_IMAPX_SETTINGS (settings));

View File

@ -0,0 +1,47 @@
$OpenBSD: patch-camel_camel-imapx-summary_c,v 1.1 2013/04/12 05:46:16 ajacoutot Exp $
From d3e1fe4060015aa1aac4bfe730a49f0de05b3c38 Mon Sep 17 00:00:00 2001
From: Milan Crha <mcrha@redhat.com>
Date: Mon, 25 Mar 2013 13:42:20 +0000
Subject: Bug #656488 - imapx: Memory leak of mi->server_user_flags
--- camel/camel-imapx-summary.c.orig Sun Mar 17 13:46:02 2013
+++ camel/camel-imapx-summary.c Fri Apr 12 07:12:05 2013
@@ -63,6 +63,11 @@ imapx_message_info_clone (CamelFolderSummary *s,
to = (CamelIMAPXMessageInfo *)
folder_summary_class->message_info_clone (s, mi);
+ if (from->server_user_flags) {
+ CamelIMAPXMessageInfo *xfrom = (CamelIMAPXMessageInfo *) from;
+
+ camel_flag_list_copy (&to->server_user_flags, &xfrom->server_user_flags);
+ }
to->server_flags = from->server_flags;
/* FIXME: parent clone should do this */
@@ -72,6 +77,17 @@ imapx_message_info_clone (CamelFolderSummary *s,
}
static void
+imapx_message_info_free (CamelFolderSummary *summary,
+ CamelMessageInfo *mi)
+{
+ CamelIMAPXMessageInfo *xinfo = (CamelIMAPXMessageInfo *) mi;
+
+ camel_flag_list_free (&xinfo->server_user_flags);
+
+ CAMEL_FOLDER_SUMMARY_CLASS (camel_imapx_summary_parent_class)->message_info_free (summary, mi);
+}
+
+static void
camel_imapx_summary_class_init (CamelIMAPXSummaryClass *class)
{
CamelFolderSummaryClass *folder_summary_class;
@@ -80,6 +96,7 @@ camel_imapx_summary_class_init (CamelIMAPXSummaryClass
folder_summary_class->message_info_size = sizeof (CamelIMAPXMessageInfo);
folder_summary_class->content_info_size = sizeof (CamelIMAPXMessageContentInfo);
folder_summary_class->message_info_clone = imapx_message_info_clone;
+ folder_summary_class->message_info_free = imapx_message_info_free;
folder_summary_class->summary_header_to_db = summary_header_to_db;
folder_summary_class->summary_header_from_db = summary_header_from_db;
folder_summary_class->message_info_to_db = message_info_to_db;

View File

@ -0,0 +1,53 @@
$OpenBSD: patch-modules_owncloud-backend_owncloud-utils_c,v 1.1 2013/04/12 05:46:16 ajacoutot Exp $
From 7cee41f44e58730e37ce79807502b1523fbc89ae Mon Sep 17 00:00:00 2001
From: Vadim Rutkovsky <vrutkovs@redhat.com>
Date: Mon, 25 Mar 2013 13:05:44 +0000
Subject: Bug 696285 - ownCloud: Check addressbook even if calendar fails
--- modules/owncloud-backend/owncloud-utils.c.orig Sun Mar 17 13:46:02 2013
+++ modules/owncloud-backend/owncloud-utils.c Fri Apr 12 07:11:07 2013
@@ -634,7 +634,8 @@ owncloud_utils_search_server (ECollectionBackend *coll
ESource *source;
EOwncloudAuthenticator *authenticator;
gchar *url;
- gboolean res = TRUE;
+ gboolean res_calendars = FALSE;
+ gboolean res_contacts = FALSE;
g_return_val_if_fail (collection != NULL, FALSE);
g_return_val_if_fail (found_cb != NULL, FALSE);
@@ -647,22 +648,22 @@ owncloud_utils_search_server (ECollectionBackend *coll
authenticator->collection = collection;
authenticator->username = e_source_collection_dup_identity (collection_extension);
- if (res && e_source_collection_get_calendar_enabled (collection_extension)) {
+ if (e_source_collection_get_calendar_enabled (collection_extension)) {
url = e_source_goa_dup_calendar_url (goa_extension);
if (url && *url)
- res = find_sources (
+ res_calendars = find_sources (
collection, found_cb, user_data,
url, "calendars", authenticator);
g_free (url);
}
- if (res && e_source_collection_get_contacts_enabled (collection_extension)) {
+ if (e_source_collection_get_contacts_enabled (collection_extension)) {
url = e_source_goa_dup_contacts_url (goa_extension);
if (url && *url)
- res = find_sources (
+ res_contacts = find_sources (
collection, found_cb, user_data,
url, "addressbooks", authenticator);
@@ -671,5 +672,5 @@ owncloud_utils_search_server (ECollectionBackend *coll
g_object_unref (authenticator);
- return res;
+ return res_calendars || res_contacts;
}