Hello community,
here is the log from the commit of package evolution-data-server for
openSUSE:Factory checked in at 2020-06-08 23:48:02
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/evolution-data-server (Old)
and /work/SRC/openSUSE:Factory/.evolution-data-server.new.3606 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "evolution-data-server"
Mon Jun 8 23:48:02 2020 rev:213 rq:811422 version:3.36.3
Changes:
--------
---
/work/SRC/openSUSE:Factory/evolution-data-server/evolution-data-server.changes
2020-04-29 20:42:49.751712544 +0200
+++
/work/SRC/openSUSE:Factory/.evolution-data-server.new.3606/evolution-data-server.changes
2020-06-08 23:48:48.254247727 +0200
@@ -1,0 +2,14 @@
+Fri May 29 19:39:53 UTC 2020 - Bjørn Lie <[email protected]>
+
+- Update to version 3.36.3:
+ + CamelFilterDriver: do_shell: NULL-terminate the arguments array
+ + CollectionBackend: Limit how often checks for new child sources
+ + Bugs fixed: glgo#GNOME/evolution-data-server#101,
+ glgo#GNOME/evolution-data-server#210,
+ glgo#GNOME/evolution-data-server#211,
+ glgo#GNOME/evolution-data-server#212,
+ glgo#GNOME/evolution-data-server#213,
+ glgo#GNOME/evolution-data-server#219,
+ glgo#GNOME/evolution#915.
+
+-------------------------------------------------------------------
Old:
----
evolution-data-server-3.36.2.tar.xz
New:
----
evolution-data-server-3.36.3.tar.xz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ evolution-data-server.spec ++++++
--- /var/tmp/diff_new_pack.p5JMvk/_old 2020-06-08 23:48:49.358251133 +0200
+++ /var/tmp/diff_new_pack.p5JMvk/_new 2020-06-08 23:48:49.358251133 +0200
@@ -32,7 +32,7 @@
%bcond_without introspection
Name: evolution-data-server
-Version: 3.36.2
+Version: 3.36.3
Release: 0
Summary: Evolution Data Server
License: LGPL-2.0-only
++++++ evolution-data-server-3.36.2.tar.xz ->
evolution-data-server-3.36.3.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/evolution-data-server-3.36.2/CMakeLists.txt
new/evolution-data-server-3.36.3/CMakeLists.txt
--- old/evolution-data-server-3.36.2/CMakeLists.txt 2020-04-24
09:55:34.000000000 +0200
+++ new/evolution-data-server-3.36.3/CMakeLists.txt 2020-05-29
13:58:48.000000000 +0200
@@ -4,7 +4,7 @@
cmake_policy(VERSION 3.1)
project(evolution-data-server
- VERSION 3.36.2
+ VERSION 3.36.3
LANGUAGES C CXX)
set(CMAKE_CXX_STANDARD 14)
set(PROJECT_BUGREPORT
"https://gitlab.gnome.org/GNOME/evolution-data-server/issues/")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/evolution-data-server-3.36.2/NEWS
new/evolution-data-server-3.36.3/NEWS
--- old/evolution-data-server-3.36.2/NEWS 2020-04-24 09:55:34.000000000
+0200
+++ new/evolution-data-server-3.36.3/NEWS 2020-05-29 13:58:48.000000000
+0200
@@ -1,3 +1,19 @@
+Evolution-Data-Server 3.36.3 2020-05-29
+---------------------------------------
+
+Bug Fixes:
+ I#101 - DAV backends: Limit server requests after getting online (Milan
Crha)
+ I#210 - Global buffer overflow in
e_contact_check_attr_type_value_used() (Milan Crha)
+ I#211 - IMAPx: No IDLE after extraneous connection reset (Milan Crha)
+ I#212 - EWebDAVSession: Ignore text/plain server responses on success
(Milan Crha)
+ I#213 - camel_mime_filter_backup() calls memcpy(null, ...) (Milan Crha)
+ I#219 - Search folder content rebuilt after a change in it (Milan Crha)
+ evo-I#915 - Fix some issues reported by Clang's ubsan sanitizer (Milan
Crha)
+
+Miscellaneous:
+ CamelFilterDriver: do_shell: NULL-terminate the arguments array (Milan
Crha)
+ ECollectionBackend: Limit how often checks for new child sources (Milan
Crha)
+
Evolution-Data-Server 3.36.2 2020-04-24
---------------------------------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/evolution-data-server-3.36.2/src/addressbook/backends/carddav/e-book-backend-carddav.c
new/evolution-data-server-3.36.3/src/addressbook/backends/carddav/e-book-backend-carddav.c
---
old/evolution-data-server-3.36.2/src/addressbook/backends/carddav/e-book-backend-carddav.c
2020-04-24 09:55:34.000000000 +0200
+++
new/evolution-data-server-3.36.3/src/addressbook/backends/carddav/e-book-backend-carddav.c
2020-05-29 13:58:48.000000000 +0200
@@ -41,6 +41,10 @@
EWebDAVSession *webdav;
GMutex webdav_lock;
+ /* If already been connected, then the connect_sync() will relax server
checks,
+ to avoid unnecessary requests towards the server. */
+ gboolean been_connected;
+
/* support for 'getctag' extension */
gboolean ctag_supported;
@@ -106,13 +110,21 @@
webdav, "proxy-resolver",
G_BINDING_SYNC_CREATE);
- /* Thinks the 'getctag' extension is available the first time, but
unset it when realizes it isn't. */
- bbdav->priv->ctag_supported = TRUE;
-
e_source_set_connection_status (source,
E_SOURCE_CONNECTION_STATUS_CONNECTING);
e_soup_session_set_credentials (E_SOUP_SESSION (webdav), credentials);
+ if (bbdav->priv->been_connected) {
+ g_mutex_lock (&bbdav->priv->webdav_lock);
+ bbdav->priv->webdav = webdav;
+ g_mutex_unlock (&bbdav->priv->webdav_lock);
+
+ return TRUE;
+ }
+
+ /* Thinks the 'getctag' extension is available the first time, but
unset it when realizes it isn't. */
+ bbdav->priv->ctag_supported = TRUE;
+
success = e_webdav_session_options_sync (webdav, NULL,
&capabilities, &allows, cancellable, &local_error);
@@ -233,7 +245,7 @@
authorized (aka without credentials), thus try something
more aggressive, just in case.
- The 'getctag' extension is not required, thuch check
+ The 'getctag' extension is not required, thus check
for unauthorized error only. */
if (!e_webdav_session_getctag_sync (webdav, NULL, &ctag,
cancellable, &local_error) &&
g_error_matches (local_error, SOUP_HTTP_ERROR,
SOUP_STATUS_UNAUTHORIZED)) {
@@ -302,6 +314,7 @@
g_mutex_lock (&bbdav->priv->webdav_lock);
bbdav->priv->webdav = webdav;
g_mutex_unlock (&bbdav->priv->webdav_lock);
+ bbdav->priv->been_connected = TRUE;
} else {
if (success) {
e_source_set_connection_status (source,
E_SOURCE_CONNECTION_STATUS_DISCONNECTED);
@@ -642,6 +655,8 @@
op_error->domain = E_CLIENT_ERROR;
op_error->code = E_CLIENT_ERROR_AUTHENTICATION_REQUIRED;
+ bbdav->priv->been_connected = FALSE;
+
if (webdav) {
ENamedParameters *credentials;
gboolean empty_credentials;
@@ -1344,6 +1359,22 @@
return E_BOOK_BACKEND_CLASS
(e_book_backend_carddav_parent_class)->impl_get_backend_property (book_backend,
prop_name);
}
+static gboolean
+ebb_carddav_refresh_sync (EBookBackendSync *sync_backend,
+ GCancellable *cancellable,
+ GError **error)
+{
+ EBookBackendCardDAV *bbdav;
+
+ g_return_val_if_fail (E_IS_BOOK_BACKEND_CARDDAV (sync_backend), FALSE);
+
+ bbdav = E_BOOK_BACKEND_CARDDAV (sync_backend);
+ bbdav->priv->been_connected = FALSE;
+
+ /* Chain up to parent's method. */
+ return E_BOOK_BACKEND_SYNC_CLASS
(e_book_backend_carddav_parent_class)->refresh_sync (sync_backend, cancellable,
error);
+}
+
static gchar *
ebb_carddav_dup_contact_revision_cb (EBookCache *book_cache,
EContact *contact)
@@ -1407,6 +1438,7 @@
{
GObjectClass *object_class;
EBookBackendClass *book_backend_class;
+ EBookBackendSyncClass *book_backend_sync_class;
EBookMetaBackendClass *book_meta_backend_class;
book_meta_backend_class = E_BOOK_META_BACKEND_CLASS (klass);
@@ -1421,6 +1453,9 @@
book_meta_backend_class->remove_contact_sync =
ebb_carddav_remove_contact_sync;
book_meta_backend_class->get_ssl_error_details =
ebb_carddav_get_ssl_error_details;
+ book_backend_sync_class = E_BOOK_BACKEND_SYNC_CLASS (klass);
+ book_backend_sync_class->refresh_sync = ebb_carddav_refresh_sync;
+
book_backend_class = E_BOOK_BACKEND_CLASS (klass);
book_backend_class->impl_get_backend_property =
ebb_carddav_get_backend_property;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/evolution-data-server-3.36.2/src/addressbook/libebook-contacts/e-contact.c
new/evolution-data-server-3.36.3/src/addressbook/libebook-contacts/e-contact.c
---
old/evolution-data-server-3.36.2/src/addressbook/libebook-contacts/e-contact.c
2020-04-24 09:55:34.000000000 +0200
+++
new/evolution-data-server-3.36.3/src/addressbook/libebook-contacts/e-contact.c
2020-05-29 13:58:48.000000000 +0200
@@ -405,8 +405,12 @@
if (skip) {
pos = 0;
- while (attr_type_values->type_values[ii] &&
attr_type_values->type_values[ii] != ';')
+ while (attr_type_values->type_values[ii] &&
attr_type_values->type_values[ii] != ';') {
+ /* To avoid buffer overflow, where the 'for'
itself also ii++ */
+ if (!attr_type_values->type_values[ii + 1])
+ break;
ii++;
+ }
}
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/evolution-data-server-3.36.2/src/addressbook/libedata-book/e-book-meta-backend.c
new/evolution-data-server-3.36.3/src/addressbook/libedata-book/e-book-meta-backend.c
---
old/evolution-data-server-3.36.2/src/addressbook/libedata-book/e-book-meta-backend.c
2020-04-24 09:55:34.000000000 +0200
+++
new/evolution-data-server-3.36.3/src/addressbook/libedata-book/e-book-meta-backend.c
2020-05-29 13:58:48.000000000 +0200
@@ -81,6 +81,7 @@
gboolean refresh_after_authenticate;
gint ever_connected;
gint connected_writable;
+ gint64 last_refresh_time; /* The time when the last refresh was
called */
/* Last successful connect data, for some extensions */
guint16 authentication_port;
@@ -874,6 +875,8 @@
ebmb_ensure_refresh_timeout_set_locked (meta_backend);
+ meta_backend->priv->last_refresh_time = g_get_real_time ();
+
g_mutex_unlock (&meta_backend->priv->property_lock);
e_book_backend_foreach_view_notify_progress (E_BOOK_BACKEND
(meta_backend), TRUE, 0, NULL);
@@ -2198,10 +2201,18 @@
meta_backend->priv->current_online_state = new_value;
- if (new_value)
- e_book_meta_backend_schedule_refresh (meta_backend);
- else
+ if (new_value) {
+ gint64 now = g_get_real_time ();
+
+ /* Do not auto-run refresh (due to getting online) more than
once per hour */
+ if (now - meta_backend->priv->last_refresh_time >=
G_USEC_PER_SEC * 60L * 60L) {
+ meta_backend->priv->last_refresh_time = now;
+
+ e_book_meta_backend_schedule_refresh (meta_backend);
+ }
+ } else {
ebmb_schedule_go_offline (meta_backend);
+ }
}
static void
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/evolution-data-server-3.36.2/src/calendar/backends/caldav/e-cal-backend-caldav.c
new/evolution-data-server-3.36.3/src/calendar/backends/caldav/e-cal-backend-caldav.c
---
old/evolution-data-server-3.36.2/src/calendar/backends/caldav/e-cal-backend-caldav.c
2020-04-24 09:55:34.000000000 +0200
+++
new/evolution-data-server-3.36.3/src/calendar/backends/caldav/e-cal-backend-caldav.c
2020-05-29 13:58:48.000000000 +0200
@@ -38,6 +38,10 @@
EWebDAVSession *webdav;
GMutex webdav_lock;
+ /* If already been connected, then the connect_sync() will relax server
checks,
+ to avoid unnecessary requests towards the server. */
+ gboolean been_connected;
+
/* support for 'getctag' extension */
gboolean ctag_supported;
@@ -142,13 +146,21 @@
webdav, "proxy-resolver",
G_BINDING_SYNC_CREATE);
- /* Thinks the 'getctag' extension is available the first time, but
unset it when realizes it isn't. */
- cbdav->priv->ctag_supported = TRUE;
-
e_source_set_connection_status (source,
E_SOURCE_CONNECTION_STATUS_CONNECTING);
e_soup_session_set_credentials (E_SOUP_SESSION (webdav), credentials);
+ if (cbdav->priv->been_connected) {
+ g_mutex_lock (&cbdav->priv->webdav_lock);
+ cbdav->priv->webdav = webdav;
+ g_mutex_unlock (&cbdav->priv->webdav_lock);
+
+ return TRUE;
+ }
+
+ /* Thinks the 'getctag' extension is available the first time, but
unset it when realizes it isn't. */
+ cbdav->priv->ctag_supported = TRUE;
+
success = e_webdav_session_options_sync (webdav, NULL,
&capabilities, &allows, cancellable, &local_error);
@@ -219,7 +231,7 @@
authorized (aka without credentials), thus try something
more aggressive, just in case.
- The 'getctag' extension is not required, thuch check
+ The 'getctag' extension is not required, thus check
for unauthorized error only. */
if (!e_webdav_session_getctag_sync (webdav, NULL, &ctag,
cancellable, &local_error) &&
g_error_matches (local_error, SOUP_HTTP_ERROR,
SOUP_STATUS_UNAUTHORIZED)) {
@@ -286,6 +298,7 @@
g_mutex_lock (&cbdav->priv->webdav_lock);
cbdav->priv->webdav = webdav;
g_mutex_unlock (&cbdav->priv->webdav_lock);
+ cbdav->priv->been_connected = TRUE;
} else {
if (success) {
e_source_set_connection_status (source,
E_SOURCE_CONNECTION_STATUS_DISCONNECTED);
@@ -783,6 +796,8 @@
op_error->domain = E_CLIENT_ERROR;
op_error->code = E_CLIENT_ERROR_AUTHENTICATION_REQUIRED;
+ cbdav->priv->been_connected = FALSE;
+
if (webdav) {
ENamedParameters *credentials;
gboolean empty_credentials;
@@ -2277,6 +2292,23 @@
}
}
+static void
+ecb_caldav_refresh_sync (ECalBackendSync *sync_backend,
+ EDataCal *cal,
+ GCancellable *cancellable,
+ GError **error)
+{
+ ECalBackendCalDAV *cbdav;
+
+ g_return_if_fail (E_IS_CAL_BACKEND_CALDAV (sync_backend));
+
+ cbdav = E_CAL_BACKEND_CALDAV (sync_backend);
+ cbdav->priv->been_connected = FALSE;
+
+ /* Chain up to parent's method. */
+ E_CAL_BACKEND_SYNC_CLASS
(e_cal_backend_caldav_parent_class)->refresh_sync (sync_backend, cal,
cancellable, error);
+}
+
static gchar *
ecb_caldav_dup_component_revision_cb (ECalCache *cal_cache,
ICalComponent *icomp)
@@ -2368,6 +2400,7 @@
cal_meta_backend_class->get_ssl_error_details =
ecb_caldav_get_ssl_error_details;
cal_backend_sync_class = E_CAL_BACKEND_SYNC_CLASS (klass);
+ cal_backend_sync_class->refresh_sync = ecb_caldav_refresh_sync;
cal_backend_sync_class->get_free_busy_sync =
ecb_caldav_get_free_busy_sync;
cal_backend_class = E_CAL_BACKEND_CLASS (klass);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/evolution-data-server-3.36.2/src/calendar/libedata-cal/e-cal-meta-backend.c
new/evolution-data-server-3.36.3/src/calendar/libedata-cal/e-cal-meta-backend.c
---
old/evolution-data-server-3.36.2/src/calendar/libedata-cal/e-cal-meta-backend.c
2020-04-24 09:55:34.000000000 +0200
+++
new/evolution-data-server-3.36.3/src/calendar/libedata-cal/e-cal-meta-backend.c
2020-05-29 13:58:48.000000000 +0200
@@ -79,6 +79,7 @@
gboolean refresh_after_authenticate;
gint ever_connected;
gint connected_writable;
+ gint64 last_refresh_time; /* The time when the last refresh was
called */
/* Last successful connect data, for some extensions */
guint16 authentication_port;
@@ -776,6 +777,8 @@
ecmb_ensure_refresh_timeout_set_locked (meta_backend);
+ meta_backend->priv->last_refresh_time = g_get_real_time ();
+
g_mutex_unlock (&meta_backend->priv->property_lock);
e_cal_backend_foreach_view_notify_progress (E_CAL_BACKEND
(meta_backend), TRUE, 0, NULL);
@@ -3097,10 +3100,18 @@
meta_backend->priv->current_online_state = new_value;
- if (new_value)
- e_cal_meta_backend_schedule_refresh (meta_backend);
- else
+ if (new_value) {
+ gint64 now = g_get_real_time ();
+
+ /* Do not auto-run refresh (due to getting online) more than
once per hour */
+ if (now - meta_backend->priv->last_refresh_time >=
G_USEC_PER_SEC * 60L * 60L) {
+ meta_backend->priv->last_refresh_time = now;
+
+ e_cal_meta_backend_schedule_refresh (meta_backend);
+ }
+ } else {
ecmb_schedule_go_offline (meta_backend);
+ }
}
static void
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/evolution-data-server-3.36.2/src/camel/camel-filter-driver.c
new/evolution-data-server-3.36.3/src/camel/camel-filter-driver.c
--- old/evolution-data-server-3.36.2/src/camel/camel-filter-driver.c
2020-04-24 09:55:34.000000000 +0200
+++ new/evolution-data-server-3.36.3/src/camel/camel-filter-driver.c
2020-05-29 13:58:48.000000000 +0200
@@ -1252,6 +1252,9 @@
g_string_truncate (command, command->len - 1);
if (driver->priv->shellfunc && argc >= 1) {
+ /* NULL-terminate the array, but do not count it into the argc
*/
+ g_ptr_array_add (args, NULL);
+
driver->priv->shellfunc (driver, argc, (gchar **) args->pdata,
driver->priv->shelldata);
camel_filter_driver_log (
driver, FILTER_LOG_ACTION,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/evolution-data-server-3.36.2/src/camel/camel-mime-filter.c
new/evolution-data-server-3.36.3/src/camel/camel-mime-filter.c
--- old/evolution-data-server-3.36.2/src/camel/camel-mime-filter.c
2020-04-24 09:55:34.000000000 +0200
+++ new/evolution-data-server-3.36.3/src/camel/camel-mime-filter.c
2020-05-29 13:58:48.000000000 +0200
@@ -312,8 +312,11 @@
filter->backbuf = g_malloc (length + BACK_HEAD);
filter->backsize = length + BACK_HEAD;
}
+
filter->backlen = length;
- memcpy (filter->backbuf, data, length);
+
+ if (length || filter->backbuf)
+ memcpy (filter->backbuf, data, length);
}
/**
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/evolution-data-server-3.36.2/src/camel/camel-trie.c
new/evolution-data-server-3.36.3/src/camel/camel-trie.c
--- old/evolution-data-server-3.36.2/src/camel/camel-trie.c 2020-04-24
09:55:34.000000000 +0200
+++ new/evolution-data-server-3.36.3/src/camel/camel-trie.c 2020-05-29
13:58:48.000000000 +0200
@@ -61,13 +61,18 @@
gsize inlen)
{
register const guchar *inptr = *in;
- const guchar *inend = inptr + inlen;
+ const guchar *inend;
register guchar c, r;
register gunichar u, m;
+ if (inlen == -1)
+ inlen = strlen ((const gchar *) inptr);
+
if (inlen == 0)
return 0;
+ inend = inptr + inlen;
+
r = *inptr++;
if (r < 0x80) {
*in = inptr;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/evolution-data-server-3.36.2/src/camel/camel-vee-folder.c
new/evolution-data-server-3.36.3/src/camel/camel-vee-folder.c
--- old/evolution-data-server-3.36.2/src/camel/camel-vee-folder.c
2020-04-24 09:55:34.000000000 +0200
+++ new/evolution-data-server-3.36.3/src/camel/camel-vee-folder.c
2020-05-29 13:58:48.000000000 +0200
@@ -812,7 +812,7 @@
static void
vee_folder_add_subfolder_uids_to_search_matches (CamelVeeDataCache *data_cache,
- GPtrArray *into,
+ GHashTable *matches_hash,
CamelFolder *subfolder,
GPtrArray *submatches)
{
@@ -821,7 +821,7 @@
guint ii;
g_return_if_fail (data_cache != NULL);
- g_return_if_fail (into != NULL);
+ g_return_if_fail (matches_hash != NULL);
if (!submatches || !submatches->len)
return;
@@ -837,10 +837,76 @@
vuid = g_strconcat (folder_id, submatches->pdata[ii], NULL);
- g_ptr_array_add (into, (gpointer) camel_pstring_add (vuid,
TRUE));
+ g_hash_table_insert (matches_hash, (gpointer) camel_pstring_add
(vuid, TRUE), NULL);
}
}
+static void
+vee_folder_add_subfolder_skipped_changes (CamelVeeFolder *vfolder,
+ CamelVeeDataCache *data_cache,
+ CamelFolder *subfolder,
+ GHashTable **pmatches_hash) /* gchar
*UID ~> NULL */
+{
+ CamelFolderChangeInfo *skipped_changes;
+ const gchar *folder_id = NULL;
+
+ g_return_if_fail (vfolder != NULL);
+ g_return_if_fail (subfolder != NULL);
+ g_return_if_fail (pmatches_hash != NULL);
+
+ g_rec_mutex_lock (&vfolder->priv->changed_lock);
+
+ #define maybe_add_uid(uid) G_STMT_START {
\
+ gchar *vuid;
\
+
\
+ if (camel_folder_summary_check_uid (subsummary, uid)) {
\
+ if (!*pmatches_hash) {
\
+ *pmatches_hash = g_hash_table_new_full
(g_str_hash, g_str_equal, \
+ (GDestroyNotify) camel_pstring_free,
NULL); \
+ }
\
+
\
+ if (!folder_id) {
\
+ CamelVeeSubfolderData *sf_data;
\
+
\
+ sf_data =
camel_vee_data_cache_get_subfolder_data (data_cache, subfolder); \
+ if (!sf_data) {
\
+ g_rec_mutex_unlock
(&vfolder->priv->changed_lock); \
+ return;
\
+ }
\
+
\
+ folder_id =
camel_vee_subfolder_data_get_folder_id (sf_data); \
+ }
\
+
\
+ vuid = g_strconcat (folder_id, uid, NULL);
\
+
\
+ g_hash_table_insert (*pmatches_hash, (gpointer)
camel_pstring_add (vuid, TRUE), NULL); \
+ }
\
+ } G_STMT_END
+
+ skipped_changes = g_hash_table_lookup (vfolder->priv->skipped_changes,
subfolder);
+
+ if (skipped_changes) {
+ CamelFolderSummary *subsummary =
camel_folder_get_folder_summary (subfolder);
+ guint ii;
+
+ for (ii = 0; ii < skipped_changes->uid_added->len; ii++) {
+ const gchar *uid =
skipped_changes->uid_added->pdata[ii];
+
+ maybe_add_uid (uid);
+ }
+
+ for (ii = 0; ii < skipped_changes->uid_changed->len; ii++) {
+ const gchar *uid =
skipped_changes->uid_changed->pdata[ii];
+
+ maybe_add_uid (uid);
+ }
+ }
+
+ #undef maybe_add_uid
+
+ g_rec_mutex_unlock (&vfolder->priv->changed_lock);
+}
+
static const gchar *
vee_folder_combine_expressions (CamelVeeFolder *vfolder,
const gchar *expression,
@@ -868,6 +934,7 @@
{
CamelVeeFolder *vfolder;
CamelVeeDataCache *data_cache;
+ GHashTable *matches_hash = NULL; /* gchar *UID ~> NULL */
GPtrArray *matches = NULL;
GList *link;
gchar *tmp = NULL;
@@ -889,29 +956,40 @@
if (submatches) {
if (submatches->len) {
- if (!matches)
- matches = g_ptr_array_new ();
+ if (!matches_hash)
+ matches_hash = g_hash_table_new_full
(g_str_hash, g_str_equal, (GDestroyNotify) camel_pstring_free, NULL);
- vee_folder_add_subfolder_uids_to_search_matches
(data_cache, matches, subfolder, submatches);
+ vee_folder_add_subfolder_uids_to_search_matches
(data_cache, matches_hash, subfolder, submatches);
}
camel_folder_search_free (subfolder, submatches);
}
+
+ vee_folder_add_subfolder_skipped_changes (vfolder, data_cache,
subfolder, &matches_hash);
}
g_free (tmp);
g_rec_mutex_unlock (&vfolder->priv->subfolder_lock);
- if (g_cancellable_set_error_if_cancelled (cancellable, error)) {
- if (matches) {
- camel_folder_search_free (folder, matches);
- matches = NULL;
- }
- } else if (!matches) {
+ if (!g_cancellable_set_error_if_cancelled (cancellable, error)) {
matches = g_ptr_array_new ();
+
+ if (matches_hash) {
+ GHashTableIter iter;
+ gpointer key;
+
+ g_hash_table_iter_init (&iter, matches_hash);
+
+ while (g_hash_table_iter_next (&iter, &key, NULL)) {
+ g_ptr_array_add (matches, (gpointer)
camel_pstring_strdup (key));
+ }
+ }
}
+ if (matches_hash)
+ g_hash_table_destroy (matches_hash);
+
return matches;
}
@@ -964,6 +1042,7 @@
CamelVeeFolder *vfolder;
CamelVeeDataCache *data_cache;
GHashTable *uids_by_folder; /* gchar *folder_id as message UID ~>
GPtrArray * */
+ GHashTable *matches_hash = NULL; /* gchar *uid ~> NULL */
GPtrArray *matches = NULL;
GList *link;
guint ii;
@@ -1022,29 +1101,40 @@
if (submatches) {
if (submatches->len) {
- if (!matches)
- matches = g_ptr_array_new ();
+ if (!matches_hash)
+ matches_hash = g_hash_table_new_full
(g_str_hash, g_str_equal, (GDestroyNotify) camel_pstring_free, NULL);
- vee_folder_add_subfolder_uids_to_search_matches
(data_cache, matches, subfolder, submatches);
+ vee_folder_add_subfolder_uids_to_search_matches
(data_cache, matches_hash, subfolder, submatches);
}
camel_folder_search_free (subfolder, submatches);
}
+
+ vee_folder_add_subfolder_skipped_changes (vfolder, data_cache,
subfolder, &matches_hash);
}
g_free (tmp);
g_rec_mutex_unlock (&vfolder->priv->subfolder_lock);
- if (g_cancellable_set_error_if_cancelled (cancellable, error)) {
- if (matches) {
- camel_folder_search_free (folder, matches);
- matches = NULL;
- }
- } else if (!matches) {
+ if (!g_cancellable_set_error_if_cancelled (cancellable, error)) {
matches = g_ptr_array_new ();
+
+ if (matches_hash) {
+ GHashTableIter iter;
+ gpointer key;
+
+ g_hash_table_iter_init (&iter, matches_hash);
+
+ while (g_hash_table_iter_next (&iter, &key, NULL)) {
+ g_ptr_array_add (matches, (gpointer)
camel_pstring_strdup (key));
+ }
+ }
}
+ if (matches_hash)
+ g_hash_table_destroy (matches_hash);
+
g_hash_table_destroy (uids_by_folder);
return matches;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/evolution-data-server-3.36.2/src/camel/providers/imapx/camel-imapx-conn-manager.c
new/evolution-data-server-3.36.3/src/camel/providers/imapx/camel-imapx-conn-manager.c
---
old/evolution-data-server-3.36.2/src/camel/providers/imapx/camel-imapx-conn-manager.c
2020-04-24 09:55:34.000000000 +0200
+++
new/evolution-data-server-3.36.3/src/camel/providers/imapx/camel-imapx-conn-manager.c
2020-05-29 13:58:48.000000000 +0200
@@ -1195,20 +1195,19 @@
cinfo = camel_imapx_conn_manager_ref_connection (conn_man,
camel_imapx_job_get_mailbox (job), &is_new_connection, cancellable, error);
if (cinfo) {
CamelIMAPXMailbox *job_mailbox;
+ CamelIMAPXMailbox *idle_mailbox;
job_mailbox = camel_imapx_job_get_mailbox (job);
if (job_mailbox)
imapx_conn_manager_inc_mailbox_busy (conn_man,
job_mailbox);
- if (camel_imapx_server_is_in_idle (cinfo->is)) {
- CamelIMAPXMailbox *idle_mailbox;
+ idle_mailbox = camel_imapx_server_ref_idle_mailbox
(cinfo->is);
- idle_mailbox =
camel_imapx_server_ref_idle_mailbox (cinfo->is);
- if (idle_mailbox)
- imapx_conn_manager_dec_mailbox_idle
(conn_man, idle_mailbox);
- g_clear_object (&idle_mailbox);
- }
+ if (idle_mailbox)
+ imapx_conn_manager_dec_mailbox_idle (conn_man,
idle_mailbox);
+
+ g_clear_object (&idle_mailbox);
success = camel_imapx_server_stop_idle_sync (cinfo->is,
cancellable, &local_error);
@@ -1267,8 +1266,6 @@
imapx_conn_manager_dec_mailbox_busy (conn_man,
job_mailbox);
if (success) {
- CamelIMAPXMailbox *idle_mailbox = NULL;
-
if (!imapx_conn_manager_has_inbox_idle
(conn_man)) {
CamelIMAPXStore *imapx_store;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/evolution-data-server-3.36.2/src/camel/providers/imapx/camel-imapx-server.c
new/evolution-data-server-3.36.3/src/camel/providers/imapx/camel-imapx-server.c
---
old/evolution-data-server-3.36.2/src/camel/providers/imapx/camel-imapx-server.c
2020-04-24 09:55:34.000000000 +0200
+++
new/evolution-data-server-3.36.3/src/camel/providers/imapx/camel-imapx-server.c
2020-05-29 13:58:48.000000000 +0200
@@ -7122,6 +7122,8 @@
mailbox = g_object_ref (is->priv->idle_mailbox);
else
mailbox = camel_imapx_server_ref_selected (is);
+ } else if (is->priv->idle_mailbox) {
+ mailbox = g_object_ref (is->priv->idle_mailbox);
}
g_mutex_unlock (&is->priv->idle_lock);
@@ -7208,6 +7210,10 @@
g_mutex_lock (&is->priv->idle_lock);
+ /* Always clear it, in case the IDLE thread disconnected due to network
error,
+ in which case the state is OFF, but the idle_mailbox can be still
set. */
+ g_clear_object (&is->priv->idle_mailbox);
+
if (is->priv->idle_state == IMAPX_IDLE_STATE_OFF) {
g_mutex_unlock (&is->priv->idle_lock);
return TRUE;
@@ -7225,7 +7231,6 @@
idle_cancellable = is->priv->idle_cancellable ? g_object_ref
(is->priv->idle_cancellable) : NULL;
g_clear_object (&is->priv->idle_cancellable);
- g_clear_object (&is->priv->idle_mailbox);
is->priv->idle_stamp++;
if (cancellable) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/evolution-data-server-3.36.2/src/libebackend/e-collection-backend.c
new/evolution-data-server-3.36.3/src/libebackend/e-collection-backend.c
--- old/evolution-data-server-3.36.2/src/libebackend/e-collection-backend.c
2020-04-24 09:55:34.000000000 +0200
+++ new/evolution-data-server-3.36.3/src/libebackend/e-collection-backend.c
2020-05-29 13:58:48.000000000 +0200
@@ -73,6 +73,7 @@
gulong notify_collection_handler_id;
gulong notify_online_handler_id;
+ gint64 last_populate_call;
guint scheduled_populate_idle_id;
};
@@ -618,16 +619,26 @@
considered new anymore. */
collection_backend_forget_new_sources (backend);
+ backend->priv->last_populate_call = g_get_real_time ();
+
class->populate (backend);
return FALSE;
}
static void
-collection_backend_schedule_populate_idle (ECollectionBackend *backend)
+collection_backend_schedule_populate_idle (ECollectionBackend *backend,
+ gboolean force)
{
g_return_if_fail (E_IS_COLLECTION_BACKEND (backend));
+ if (!force) {
+ /* Let automatically check for new child sources only once per
day.
+ Users can still force this manually using
e_source_registry_refresh_backend(). */
+ if (g_get_real_time () - backend->priv->last_populate_call <
G_USEC_PER_SEC * 60L * 60L * 24L)
+ return;
+ }
+
if (!backend->priv->scheduled_populate_idle_id)
backend->priv->scheduled_populate_idle_id = g_idle_add_full (
G_PRIORITY_LOW,
@@ -654,7 +665,7 @@
g_strcmp0 (g_param_spec_get_name (param), "mail-enabled") != 0))
return;
- collection_backend_schedule_populate_idle (collection_backend);
+ e_collection_backend_schedule_populate (collection_backend);
}
static void
@@ -725,6 +736,17 @@
}
static void
+collection_backend_online_changed_cb (ECollectionBackend *collection_backend,
+ GParamSpec *param,
+ gpointer user_data)
+{
+ g_return_if_fail (E_IS_COLLECTION_BACKEND (collection_backend));
+
+ if (e_backend_get_online (E_BACKEND (collection_backend)))
+ collection_backend_schedule_populate_idle (collection_backend,
FALSE);
+}
+
+static void
collection_backend_set_server (ECollectionBackend *backend,
ESourceRegistryServer *server)
{
@@ -950,10 +972,10 @@
/* Populate the newly-added collection from an idle callback
* so persistent child sources have a chance to be added first. */
- collection_backend_schedule_populate_idle (backend);
+ collection_backend_schedule_populate_idle (backend, TRUE);
backend->priv->notify_online_handler_id = g_signal_connect (backend,
"notify::online",
- G_CALLBACK (e_collection_backend_schedule_populate), NULL);
+ G_CALLBACK (collection_backend_online_changed_cb), NULL);
}
static void
@@ -1982,5 +2004,5 @@
g_return_if_fail (E_IS_COLLECTION_BACKEND (backend));
if (e_backend_get_online (E_BACKEND (backend)))
- collection_backend_schedule_populate_idle (backend);
+ collection_backend_schedule_populate_idle (backend, TRUE);
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/evolution-data-server-3.36.2/src/libedataserver/e-webdav-session.c
new/evolution-data-server-3.36.3/src/libedataserver/e-webdav-session.c
--- old/evolution-data-server-3.36.2/src/libedataserver/e-webdav-session.c
2020-04-24 09:55:34.000000000 +0200
+++ new/evolution-data-server-3.36.3/src/libedataserver/e-webdav-session.c
2020-05-29 13:58:48.000000000 +0200
@@ -860,7 +860,8 @@
gboolean
ignore_multistatus,
const gchar *prefix,
GError **inout_error,
- gboolean
can_change_last_dav_error_code)
+ gboolean
can_change_last_dav_error_code,
+ gboolean
skip_text_on_success)
{
SoupMessage *message;
GByteArray byte_array = { 0 };
@@ -912,7 +913,7 @@
}
content_type = soup_message_headers_get_content_type
(message->response_headers, NULL);
- if (content_type && (
+ if (content_type && (!skip_text_on_success || (status_code &&
!SOUP_STATUS_IS_SUCCESSFUL (status_code))) && (
(g_ascii_strcasecmp (content_type, "application/xml") == 0 ||
g_ascii_strcasecmp (content_type, "text/xml") == 0))) {
xmlDocPtr doc;
@@ -969,10 +970,10 @@
xmlXPathFreeContext (xpath_ctx);
xmlFreeDoc (doc);
}
- } else if (content_type &&
+ } else if (content_type && (!skip_text_on_success || (status_code &&
!SOUP_STATUS_IS_SUCCESSFUL (status_code))) &&
g_ascii_strcasecmp (content_type, "text/plain") == 0) {
detail_text = g_strndup ((const gchar *) byte_array.data,
byte_array.len);
- } else if (content_type &&
+ } else if (content_type && (!skip_text_on_success || (status_code &&
!SOUP_STATUS_IS_SUCCESSFUL (status_code))) &&
g_ascii_strcasecmp (content_type, "text/html") == 0) {
SoupURI *soup_uri;
gchar *uri = NULL;
@@ -1088,7 +1089,7 @@
const gchar *prefix,
GError **inout_error)
{
- return e_webdav_session_replace_with_detailed_error_internal (webdav,
request, response_data, ignore_multistatus, prefix, inout_error, FALSE);
+ return e_webdav_session_replace_with_detailed_error_internal (webdav,
request, response_data, ignore_multistatus, prefix, inout_error, FALSE, FALSE);
}
/**
@@ -1335,7 +1336,7 @@
bytes = e_soup_session_send_request_simple_sync (E_SOUP_SESSION
(webdav), request, cancellable, error);
- success = !e_webdav_session_replace_with_detailed_error_internal
(webdav, request, bytes, TRUE, _("Failed to post data"), error, TRUE) &&
+ success = !e_webdav_session_replace_with_detailed_error_internal
(webdav, request, bytes, TRUE, _("Failed to post data"), error, TRUE, FALSE) &&
bytes != NULL;
if (success) {
@@ -1483,7 +1484,7 @@
bytes = e_soup_session_send_request_simple_sync (E_SOUP_SESSION
(webdav), request, cancellable, error);
- success = !e_webdav_session_replace_with_detailed_error_internal
(webdav, request, bytes, TRUE, _("Failed to get properties"), error, TRUE) &&
+ success = !e_webdav_session_replace_with_detailed_error_internal
(webdav, request, bytes, TRUE, _("Failed to get properties"), error, TRUE,
FALSE) &&
bytes != NULL;
if (success)
@@ -1559,7 +1560,7 @@
bytes = e_soup_session_send_request_simple_sync (E_SOUP_SESSION
(webdav), request, cancellable, error);
- success = !e_webdav_session_replace_with_detailed_error_internal
(webdav, request, bytes, FALSE, _("Failed to update properties"), error, TRUE)
&&
+ success = !e_webdav_session_replace_with_detailed_error_internal
(webdav, request, bytes, FALSE, _("Failed to update properties"), error, TRUE,
FALSE) &&
bytes != NULL;
if (bytes)
@@ -1665,7 +1666,7 @@
bytes = e_soup_session_send_request_simple_sync (E_SOUP_SESSION
(webdav), request, cancellable, error);
- success = !e_webdav_session_replace_with_detailed_error_internal
(webdav, request, bytes, TRUE, _("Failed to issue REPORT"), error, TRUE) &&
+ success = !e_webdav_session_replace_with_detailed_error_internal
(webdav, request, bytes, TRUE, _("Failed to issue REPORT"), error, TRUE, FALSE)
&&
bytes != NULL;
if (success && func && message->status_code == SOUP_STATUS_MULTI_STATUS)
@@ -1726,7 +1727,7 @@
bytes = e_soup_session_send_request_simple_sync (E_SOUP_SESSION
(webdav), request, cancellable, error);
- success = !e_webdav_session_replace_with_detailed_error_internal
(webdav, request, bytes, FALSE, _("Failed to create collection"), error, TRUE)
&&
+ success = !e_webdav_session_replace_with_detailed_error_internal
(webdav, request, bytes, FALSE, _("Failed to create collection"), error, TRUE,
FALSE) &&
bytes != NULL;
if (bytes)
@@ -1831,7 +1832,7 @@
bytes = e_soup_session_send_request_simple_sync (E_SOUP_SESSION
(webdav), request, cancellable, error);
- success = !e_webdav_session_replace_with_detailed_error_internal
(webdav, request, bytes, FALSE, _("Failed to create address book"), error,
TRUE) &&
+ success = !e_webdav_session_replace_with_detailed_error_internal
(webdav, request, bytes, FALSE, _("Failed to create address book"), error,
TRUE, FALSE) &&
bytes != NULL;
if (bytes)
@@ -1993,7 +1994,7 @@
bytes = e_soup_session_send_request_simple_sync (E_SOUP_SESSION
(webdav), request, cancellable, error);
- success = !e_webdav_session_replace_with_detailed_error_internal
(webdav, request, bytes, FALSE, _("Failed to create calendar"), error, TRUE) &&
+ success = !e_webdav_session_replace_with_detailed_error_internal
(webdav, request, bytes, FALSE, _("Failed to create calendar"), error, TRUE,
FALSE) &&
bytes != NULL;
if (bytes)
@@ -2127,7 +2128,7 @@
tmp_bytes.data = buffer;
tmp_bytes.len = nread;
- success =
!e_webdav_session_replace_with_detailed_error_internal (webdav, request,
&tmp_bytes, FALSE, _("Failed to read resource"), error, TRUE);
+ success =
!e_webdav_session_replace_with_detailed_error_internal (webdav, request,
&tmp_bytes, FALSE, _("Failed to read resource"), error, TRUE, TRUE);
if (!success)
break;
}
@@ -2138,7 +2139,7 @@
}
if (success && first_chunk) {
- success =
!e_webdav_session_replace_with_detailed_error_internal (webdav, request, NULL,
FALSE, _("Failed to read resource"), error, TRUE);
+ success =
!e_webdav_session_replace_with_detailed_error_internal (webdav, request, NULL,
FALSE, _("Failed to read resource"), error, TRUE, TRUE);
} else if (success && !first_chunk && log_level ==
SOUP_LOGGER_LOG_BODY) {
fprintf (stdout, "\n");
fflush (stdout);
@@ -2452,7 +2453,7 @@
g_signal_handler_disconnect (message, wrote_headers_id);
g_signal_handler_disconnect (message, wrote_chunk_id);
- success = !e_webdav_session_replace_with_detailed_error_internal
(webdav, request, bytes, FALSE, _("Failed to put data"), error, TRUE) &&
+ success = !e_webdav_session_replace_with_detailed_error_internal
(webdav, request, bytes, FALSE, _("Failed to put data"), error, TRUE, TRUE) &&
bytes != NULL;
if (cwd.wrote_any && cwd.log_level == SOUP_LOGGER_LOG_BODY) {
@@ -2598,7 +2599,7 @@
ret_bytes = e_soup_session_send_request_simple_sync (E_SOUP_SESSION
(webdav), request, cancellable, error);
- success = !e_webdav_session_replace_with_detailed_error_internal
(webdav, request, ret_bytes, FALSE, _("Failed to put data"), error, TRUE) &&
+ success = !e_webdav_session_replace_with_detailed_error_internal
(webdav, request, ret_bytes, FALSE, _("Failed to put data"), error, TRUE, TRUE)
&&
ret_bytes != NULL;
if (success) {
@@ -2700,7 +2701,7 @@
bytes = e_soup_session_send_request_simple_sync (E_SOUP_SESSION
(webdav), request, cancellable, error);
- success = !e_webdav_session_replace_with_detailed_error_internal
(webdav, request, bytes, FALSE, _("Failed to delete resource"), error, TRUE) &&
+ success = !e_webdav_session_replace_with_detailed_error_internal
(webdav, request, bytes, FALSE, _("Failed to delete resource"), error, TRUE,
FALSE) &&
bytes != NULL;
if (bytes)
@@ -2769,7 +2770,7 @@
bytes = e_soup_session_send_request_simple_sync (E_SOUP_SESSION
(webdav), request, cancellable, error);
- success = !e_webdav_session_replace_with_detailed_error_internal
(webdav, request, bytes, FALSE, _("Failed to copy resource"), error, TRUE) &&
+ success = !e_webdav_session_replace_with_detailed_error_internal
(webdav, request, bytes, FALSE, _("Failed to copy resource"), error, TRUE,
FALSE) &&
bytes != NULL;
if (bytes)
@@ -2833,7 +2834,7 @@
bytes = e_soup_session_send_request_simple_sync (E_SOUP_SESSION
(webdav), request, cancellable, error);
- success = !e_webdav_session_replace_with_detailed_error_internal
(webdav, request, bytes, FALSE, _("Failed to move resource"), error, TRUE) &&
+ success = !e_webdav_session_replace_with_detailed_error_internal
(webdav, request, bytes, FALSE, _("Failed to move resource"), error, TRUE,
FALSE) &&
bytes != NULL;
if (bytes)
@@ -2940,7 +2941,7 @@
bytes = e_soup_session_send_request_simple_sync (E_SOUP_SESSION
(webdav), request, cancellable, error);
- success = !e_webdav_session_replace_with_detailed_error_internal
(webdav, request, bytes, FALSE, _("Failed to lock resource"), error, TRUE) &&
+ success = !e_webdav_session_replace_with_detailed_error_internal
(webdav, request, bytes, FALSE, _("Failed to lock resource"), error, TRUE,
FALSE) &&
bytes != NULL;
if (success && out_xml_response) {
@@ -3050,7 +3051,7 @@
bytes = e_soup_session_send_request_simple_sync (E_SOUP_SESSION
(webdav), request, cancellable, error);
- success = !e_webdav_session_replace_with_detailed_error_internal
(webdav, request, bytes, FALSE, _("Failed to refresh lock"), error, TRUE) &&
+ success = !e_webdav_session_replace_with_detailed_error_internal
(webdav, request, bytes, FALSE, _("Failed to refresh lock"), error, TRUE,
FALSE) &&
bytes != NULL;
if (bytes)
@@ -3111,7 +3112,7 @@
bytes = e_soup_session_send_request_simple_sync (E_SOUP_SESSION
(webdav), request, cancellable, error);
- success = !e_webdav_session_replace_with_detailed_error_internal
(webdav, request, bytes, FALSE, _("Failed to unlock"), error, TRUE) &&
+ success = !e_webdav_session_replace_with_detailed_error_internal
(webdav, request, bytes, FALSE, _("Failed to unlock"), error, TRUE, FALSE) &&
bytes != NULL;
if (bytes)
@@ -4227,7 +4228,7 @@
bytes = e_soup_session_send_request_simple_sync (E_SOUP_SESSION
(webdav), request, cancellable, error);
- success = !e_webdav_session_replace_with_detailed_error_internal
(webdav, request, bytes, TRUE, _("Failed to get access control list"), error,
TRUE) &&
+ success = !e_webdav_session_replace_with_detailed_error_internal
(webdav, request, bytes, TRUE, _("Failed to get access control list"), error,
TRUE, FALSE) &&
bytes != NULL;
if (bytes)