Hello community,

here is the log from the commit of package evolution-data-server for 
openSUSE:Factory checked in at 2019-11-29 15:56:49
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/evolution-data-server (Old)
 and      /work/SRC/openSUSE:Factory/.evolution-data-server.new.26869 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "evolution-data-server"

Fri Nov 29 15:56:49 2019 rev:206 rq:750934 version:3.34.2

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/evolution-data-server/evolution-data-server.changes  
    2019-10-17 12:57:57.721506982 +0200
+++ 
/work/SRC/openSUSE:Factory/.evolution-data-server.new.26869/evolution-data-server.changes
   2019-11-29 15:57:44.944943042 +0100
@@ -1,0 +2,21 @@
+Fri Nov 22 11:01:29 UTC 2019 - Bjørn Lie <[email protected]>
+
+- Update to version 3.34.2:
+  + EWeatherSource: Use g_signal_connect_object() in
+    e_weather_source_parse().
+  + Correct runtime warning from camel_network_service_can_reach().
+  + ESoupSession: Do not presend credentials on insecure
+    connections.
+  + EBackend: Slightly enhance g_warning() messages with an ESource
+    identification.
+  + ESource: Required signals not connected after EDBusObject is
+    replaced.
+  + LDAP: Change how LDAP query is constructed.
+  + Bugs fixed: glgo#GNOME/evolution-data-server#156,
+    glgo#GNOME/evolution-data-server#159,
+    glgo#GNOME/evolution-data-server#162,
+    glgo#GNOME/evolution-data-server#164,
+    glgo#GNOME/evolution-data-server#169,
+    glgo#GNOME/evolution-data-server#173.
+
+-------------------------------------------------------------------

Old:
----
  evolution-data-server-3.34.1.tar.xz

New:
----
  evolution-data-server-3.34.2.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ evolution-data-server.spec ++++++
--- /var/tmp/diff_new_pack.haP3vD/_old  2019-11-29 15:57:46.028942420 +0100
+++ /var/tmp/diff_new_pack.haP3vD/_new  2019-11-29 15:57:46.032942418 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package evolution-data-server
 #
-# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -32,7 +32,7 @@
 %bcond_without introspection
 
 Name:           evolution-data-server
-Version:        3.34.1
+Version:        3.34.2
 Release:        0
 Summary:        Evolution Data Server
 License:        LGPL-2.0-only

++++++ evolution-data-server-3.34.1.tar.xz -> 
evolution-data-server-3.34.2.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/evolution-data-server-3.34.1/CMakeLists.txt 
new/evolution-data-server-3.34.2/CMakeLists.txt
--- old/evolution-data-server-3.34.1/CMakeLists.txt     2019-10-07 
09:13:09.000000000 +0200
+++ new/evolution-data-server-3.34.2/CMakeLists.txt     2019-11-22 
10:34:18.000000000 +0100
@@ -4,7 +4,7 @@
 cmake_policy(VERSION 3.1)
 
 project(evolution-data-server
-       VERSION 3.34.1
+       VERSION 3.34.2
        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.34.1/NEWS 
new/evolution-data-server-3.34.2/NEWS
--- old/evolution-data-server-3.34.1/NEWS       2019-10-07 09:13:09.000000000 
+0200
+++ new/evolution-data-server-3.34.2/NEWS       2019-11-22 10:34:18.000000000 
+0100
@@ -1,3 +1,22 @@
+Evolution-Data-Server 3.34.2 2019-11-22
+---------------------------------------
+
+Bug Fixes:
+       I#156 - EBook/CalMetaBackend: Automatic refresh not always setup ][ 
(Milan Crha)
+       I#159 - LDAP: Fails to read userCertificate from the server (Milan Crha)
+       I#162 - e-cal-recur: Ignores recurrence exceptions (Milan Crha)
+       I#164 - HSTS (RFC 6797) support for "On The Web" calendars (Milan Crha)
+       I#169 - Detached instances shown as with floating time (Milan Crha)
+       I#173 - ESoupSession: Accept also compressed responses (Milan Crha)
+
+Miscellaneous:
+       EWeatherSource: Use g_signal_connect_object() in 
e_weather_source_parse() (Milan Crha)
+       Correct runtime warning from camel_network_service_can_reach() (Milan 
Crha)
+       ESoupSession: Do not presend credentials on insecure connections (Milan 
Crha)
+       EBackend: Slightly enhance g_warning() messages with an ESource 
identification (Milan Crha)
+       ESource: Required signals not connected after EDBusObject is replaced 
(Milan Crha)
+       LDAP: Change how LDAP query is constructed (Milan Crha)
+
 Evolution-Data-Server 3.34.1 2019-10-07
 ---------------------------------------
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/evolution-data-server-3.34.1/src/addressbook/backends/ldap/e-book-backend-ldap.c
 
new/evolution-data-server-3.34.2/src/addressbook/backends/ldap/e-book-backend-ldap.c
--- 
old/evolution-data-server-3.34.1/src/addressbook/backends/ldap/e-book-backend-ldap.c
        2019-10-07 09:13:09.000000000 +0200
+++ 
new/evolution-data-server-3.34.2/src/addressbook/backends/ldap/e-book-backend-ldap.c
        2019-11-22 10:34:18.000000000 +0100
@@ -246,18 +246,21 @@
 static gboolean photo_compare (EContact * ecard1, EContact * ecard2);
 
 static void cert_populate (EContact *contact, struct berval **ber_values);
+static struct berval **cert_ber (EContact *contact, GError **error);
+static gboolean cert_compare (EContact *ecard1, EContact *ecard2);
 
 static struct prop_info {
        EContactField field_id;
        const gchar *ldap_attr;
-#define PROP_TYPE_STRING    0x01
-#define PROP_TYPE_COMPLEX   0x02
-#define PROP_TYPE_BINARY    0x04
-#define PROP_CALENTRY       0x08
-#define PROP_EVOLVE         0x10
-#define PROP_WRITE_ONLY     0x20
-#define PROP_TYPE_GROUP     0x40
-#define PROP_TYPE_CONTACT   0x80 /* is ignored for contact lists */
+#define PROP_TYPE_STRING       (1 << 0)
+#define PROP_TYPE_COMPLEX      (1 << 1)
+#define PROP_TYPE_BINARY       (1 << 2)
+#define PROP_CALENTRY          (1 << 3)
+#define PROP_EVOLVE            (1 << 4)
+#define PROP_WRITE_ONLY                (1 << 5)
+#define PROP_TYPE_GROUP                (1 << 6)
+#define PROP_TYPE_CONTACT      (1 << 7) /* is ignored for contact lists */
+#define PROP_TYPE_FORCE_BINARY (1 << 8) /* to force ";binary" in attribute 
name */
        gint prop_type;
 
        /* the remaining items are only used for the TYPE_COMPLEX props */
@@ -274,6 +277,7 @@
 } prop_info[] = {
 
 #define BINARY_PROP(fid,a,ctor,ber,cmp) {fid, a, PROP_TYPE_BINARY, NULL, ber, 
cmp, ctor}
+#define BINARY_PROP_FORCED(fid,a,ctor,ber,cmp) {fid, a, PROP_TYPE_BINARY | 
PROP_TYPE_FORCE_BINARY, NULL, ber, cmp, ctor}
 #define COMPLEX_PROP(fid,a,ctor,ber,cmp) {fid, a, PROP_TYPE_COMPLEX, ctor, 
ber, cmp}
 #define E_COMPLEX_PROP(fid,a,ctor,ber,cmp) {fid, a, PROP_TYPE_COMPLEX | 
PROP_EVOLVE, ctor, ber, cmp}
 #define STRING_PROP(fid,a) {fid, a, PROP_TYPE_STRING}
@@ -342,12 +346,12 @@
        BINARY_PROP  (E_CONTACT_PHOTO,       "jpegPhoto", photo_populate, 
photo_ber, photo_compare),
 
        /* certificate foo. */
-       BINARY_PROP  (E_CONTACT_X509_CERT,   "userCertificate", cert_populate, 
NULL/*XXX */, NULL/*XXX */),
+       BINARY_PROP_FORCED (E_CONTACT_X509_CERT,   "userCertificate", 
cert_populate, cert_ber, cert_compare),
 #if 0
        /* hm, which do we use?  the inetOrgPerson schema says that
         * userSMIMECertificate should be used in favor of
         * userCertificate for S/MIME applications. */
-       BINARY_PROP  (E_CONTACT_X509_CERT,   "userSMIMECertificate", 
cert_populate, NULL/*XXX */, NULL/*XXX */),
+       BINARY_PROP  (E_CONTACT_X509_CERT,   "userSMIMECertificate", 
cert_populate, cert_ber, cert_compare),
 #endif
 
        /* misc fields */
@@ -1408,7 +1412,10 @@
                                        mod->mod_op = LDAP_MOD_REPLACE;
                        }
 
-                       mod->mod_type = g_strdup (prop_info[i].ldap_attr);
+                       if ((prop_info[i].prop_type & PROP_TYPE_FORCE_BINARY) 
!= 0)
+                               mod->mod_type = g_strconcat 
(prop_info[i].ldap_attr, ";binary", NULL);
+                       else
+                               mod->mod_type = g_strdup 
(prop_info[i].ldap_attr);
 
                        if (prop_info[i].prop_type & PROP_TYPE_STRING) {
                                mod->mod_values = g_new (gchar *, 2);
@@ -3367,11 +3374,12 @@
                result[0]->bv_len = photo->data.inlined.length;
                result[0]->bv_val = g_malloc (photo->data.inlined.length);
                memcpy (result[0]->bv_val, photo->data.inlined.data, 
photo->data.inlined.length);
-               e_contact_photo_free (photo);
 
                result[1] = NULL;
        }
 
+       e_contact_photo_free (photo);
+
        return result;
 }
 
@@ -3422,6 +3430,54 @@
        }
 }
 
+static struct berval **
+cert_ber (EContact *contact,
+         GError **error)
+{
+       struct berval **result = NULL;
+       EContactCert *cert;
+
+       cert = e_contact_get (contact, E_CONTACT_X509_CERT);
+
+       if (cert && cert->length && cert->data) {
+
+               result = g_new (struct berval *, 2);
+               result[0] = g_new (struct berval, 1);
+               result[0]->bv_val = g_malloc (cert->length);
+               result[0]->bv_len = cert->length;
+               memcpy (result[0]->bv_val, cert->data, cert->length);
+
+               result[1] = NULL;
+       }
+
+       e_contact_cert_free (cert);
+
+       return result;
+}
+
+static gboolean
+cert_compare (EContact *ecard1,
+             EContact *ecard2)
+{
+       EContactCert *cert1, *cert2;
+       gboolean equal;
+
+       cert1 = e_contact_get (ecard1, E_CONTACT_X509_CERT);
+       cert2 = e_contact_get (ecard2, E_CONTACT_X509_CERT);
+
+       if (cert1 && cert2) {
+               equal = cert1->length == cert2->length && cert1->data && 
cert2->data &&
+                       !memcmp (cert1->data, cert2->data, cert1->length);
+       } else {
+               equal = cert1 == cert2;
+       }
+
+       e_contact_cert_free (cert1);
+       e_contact_cert_free (cert2);
+
+       return equal;
+}
+
 typedef struct {
        GList *list;
        EBookBackendLDAP *bl;
@@ -3906,7 +3962,6 @@
        gchar *retval;
        EBookBackendLDAPSExpData data;
        gint i;
-       gchar **strings;
 
        data.list = NULL;
        data.bl = bl;
@@ -3941,21 +3996,11 @@
                if (data.list->next) {
                        g_warning ("LDAP: conversion of '%s' to ldap query 
string failed", query);
                        retval = NULL;
-               }
-               else {
-                       if (bl->priv->ldap_search_filter && 
*bl->priv->ldap_search_filter
-                               && g_ascii_strcasecmp 
(bl->priv->ldap_search_filter, "(objectClass=*)") != 0) {
-                               strings = g_new0 (gchar *, 5);
-                               strings[0] = g_strdup ("(&");
-                               strings[1] = g_strdup_printf ("%s", 
bl->priv->ldap_search_filter);
-                               strings[2] = data.list->data;
-                               strings[3] = g_strdup (")");
-                               retval = g_strjoinv (" ", strings);
-                               for (i = 0; i < 4; i++)
-                                       g_free (strings[i]);
-                               g_free (strings);
-                       }
-                       else {
+               } else {
+                       if (bl->priv->ldap_search_filter && 
*bl->priv->ldap_search_filter &&
+                           g_ascii_strcasecmp (bl->priv->ldap_search_filter, 
"(objectClass=*)") != 0) {
+                               retval = g_strdup_printf ("(& %s %s)", 
bl->priv->ldap_search_filter, (const gchar *) data.list->data);
+                       } else {
                                retval = g_strdup (data.list->data);
                        }
                }
@@ -4058,12 +4103,25 @@
                        ldap_value_free (values);
                }
                else {
-                       for (i = 0; i < G_N_ELEMENTS (prop_info); i++)
+                       for (i = 0; i < G_N_ELEMENTS (prop_info); i++) {
                                if (!g_ascii_strcasecmp (attr, 
prop_info[i].ldap_attr)) {
                                        info = &prop_info[i];
                                        break;
                                }
 
+                               if ((prop_info[i].prop_type & 
PROP_TYPE_FORCE_BINARY) != 0) {
+                                       const gchar *semicolon;
+
+                                       semicolon = strchr (attr, ';');
+
+                                       if (semicolon && g_ascii_strcasecmp 
(semicolon, ";binary") == 0 &&
+                                           g_ascii_strncasecmp (attr, 
prop_info[i].ldap_attr, semicolon - attr) == 0) {
+                                               info = &prop_info[i];
+                                               break;
+                                       }
+                               }
+                       }
+
                        if (enable_debug)
                                printf ("info = %p\n", (gpointer) info);
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/evolution-data-server-3.34.1/src/addressbook/libedata-book/e-book-meta-backend.c
 
new/evolution-data-server-3.34.2/src/addressbook/libedata-book/e-book-meta-backend.c
--- 
old/evolution-data-server-3.34.1/src/addressbook/libedata-book/e-book-meta-backend.c
        2019-10-07 09:13:09.000000000 +0200
+++ 
new/evolution-data-server-3.34.2/src/addressbook/libedata-book/e-book-meta-backend.c
        2019-11-22 10:34:18.000000000 +0100
@@ -916,10 +916,8 @@
        if (!meta_backend->priv->refresh_timeout_id) {
                ESource *source = e_backend_get_source (E_BACKEND 
(meta_backend));
 
-               if (e_source_has_extension (source, 
E_SOURCE_EXTENSION_REFRESH)) {
-                       meta_backend->priv->refresh_timeout_id = 
e_source_refresh_add_timeout (source, NULL,
-                               ebmb_source_refresh_timeout_cb, e_weak_ref_new 
(meta_backend), (GDestroyNotify) e_weak_ref_free);
-               }
+               meta_backend->priv->refresh_timeout_id = 
e_source_refresh_add_timeout (source, NULL,
+                       ebmb_source_refresh_timeout_cb, e_weak_ref_new 
(meta_backend), (GDestroyNotify) e_weak_ref_free);
        }
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/evolution-data-server-3.34.1/src/calendar/backends/http/e-cal-backend-http.c
 
new/evolution-data-server-3.34.2/src/calendar/backends/http/e-cal-backend-http.c
--- 
old/evolution-data-server-3.34.1/src/calendar/backends/http/e-cal-backend-http.c
    2019-10-07 09:13:09.000000000 +0200
+++ 
new/evolution-data-server-3.34.2/src/calendar/backends/http/e-cal-backend-http.c
    2019-11-22 10:34:18.000000000 +0100
@@ -42,16 +42,19 @@
        GInputStream *input_stream;
        GRecMutex conn_lock;
        GHashTable *components; /* gchar *uid ~> ICalComponent * */
+       gint64 hsts_until_time;
 };
 
 static gchar *
 ecb_http_webcal_to_http_method (const gchar *webcal_str,
                                gboolean secure)
 {
-       if (secure && (strncmp ("http://";, webcal_str, sizeof ("http://";) - 1) 
== 0))
+       if (secure && (
+           g_str_has_prefix (webcal_str, "http://";) ||
+           g_str_has_prefix (webcal_str, "webcal://")))
                return g_strconcat ("https://";, webcal_str + sizeof ("http://";) 
- 1, NULL);
 
-       if (strncmp ("webcal://", webcal_str, sizeof ("webcal://") - 1))
+       if (!g_str_has_prefix (webcal_str, "webcal://"))
                return g_strdup (webcal_str);
 
        if (secure)
@@ -92,6 +95,8 @@
                return NULL;
        }
 
+       secure_connection = secure_connection || (cbhttp->priv->hsts_until_time 
&& g_get_real_time () <= cbhttp->priv->hsts_until_time);
+
        uri = ecb_http_webcal_to_http_method (uri_string, secure_connection);
 
        g_free (uri_string);
@@ -99,6 +104,59 @@
        return uri;
 }
 
+/* https://tools.ietf.org/html/rfc6797 */
+static gint64
+ecb_http_extract_hsts_until_time (ECalBackendHttp *cbhttp)
+{
+       SoupMessage *message;
+       GTlsCertificate *cert = NULL;
+       GTlsCertificateFlags cert_errors = 0;
+       gint64 hsts_until_time = 0;
+
+       g_return_val_if_fail (E_IS_CAL_BACKEND_HTTP (cbhttp), hsts_until_time);
+       g_return_val_if_fail (cbhttp->priv->request, hsts_until_time);
+
+       message = soup_request_http_get_message (cbhttp->priv->request);
+       if (!message)
+               return hsts_until_time;
+
+       if (message->response_headers &&
+           soup_message_get_https_status (message, &cert, &cert_errors) &&
+           !cert_errors) {
+               const gchar *hsts_header;
+
+               hsts_header = soup_message_headers_get_one 
(message->response_headers, "Strict-Transport-Security");
+               if (hsts_header && *hsts_header) {
+                       GHashTable *params;
+
+                       params = soup_header_parse_semi_param_list 
(hsts_header);
+                       if (params) {
+                               const gchar *max_age;
+
+                               max_age = g_hash_table_lookup (params, 
"max-age");
+
+                               if (max_age && *max_age) {
+                                       gint64 value;
+
+                                       if (*max_age == '\"')
+                                               max_age++;
+
+                                       value = g_ascii_strtoll (max_age, NULL, 
10);
+
+                                       if (value > 0)
+                                               hsts_until_time = 
g_get_real_time () + (value * G_USEC_PER_SEC);
+                               }
+
+                               soup_header_free_param_list (params);
+                       }
+               }
+       }
+
+       g_object_unref (message);
+
+       return hsts_until_time;
+}
+
 static gchar *
 ecb_http_read_stream_sync (GInputStream *input_stream,
                           goffset expected_length,
@@ -205,9 +263,14 @@
                if (success) {
                        e_source_set_connection_status (source, 
E_SOURCE_CONNECTION_STATUS_CONNECTED);
                } else {
-                       guint status_code = message ? message->status_code : 
SOUP_STATUS_MALFORMED;
+                       guint status_code;
                        gboolean credentials_empty;
 
+                       if (local_error && local_error->domain == 
SOUP_HTTP_ERROR)
+                               status_code = local_error->code;
+                       else
+                               status_code = message ? message->status_code : 
SOUP_STATUS_MALFORMED;
+
                        credentials_empty = !credentials || 
!e_named_parameters_count (credentials);
 
                        *out_auth_result = E_SOURCE_AUTHENTICATION_ERROR;
@@ -215,7 +278,8 @@
                        /* because evolution knows only G_IO_ERROR_CANCELLED */
                        if (status_code == SOUP_STATUS_CANCELLED) {
                                g_set_error (error, G_IO_ERROR, 
G_IO_ERROR_CANCELLED,
-                                       "%s", message->reason_phrase);
+                                       "%s", (local_error && 
local_error->domain == SOUP_HTTP_ERROR) ? local_error->message :
+                                       (message && message->reason_phrase) ? 
message->reason_phrase : soup_status_get_phrase (status_code));
                        } else if (status_code == SOUP_STATUS_FORBIDDEN && 
credentials_empty) {
                                *out_auth_result = 
E_SOURCE_AUTHENTICATION_REQUIRED;
                        } else if (status_code == SOUP_STATUS_UNAUTHORIZED) {
@@ -252,11 +316,16 @@
        if (success) {
                cbhttp->priv->request = request;
                cbhttp->priv->input_stream = input_stream;
+               cbhttp->priv->hsts_until_time = 
ecb_http_extract_hsts_until_time (cbhttp);
 
                *out_auth_result = E_SOURCE_AUTHENTICATION_ACCEPTED;
        } else {
                g_clear_object (&request);
                g_clear_object (&input_stream);
+
+               if (*out_auth_result != E_SOURCE_AUTHENTICATION_REQUIRED &&
+                   *out_auth_result != E_SOURCE_AUTHENTICATION_REJECTED)
+                       cbhttp->priv->hsts_until_time = 0;
        }
 
        g_rec_mutex_unlock (&cbhttp->priv->conn_lock);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/evolution-data-server-3.34.1/src/calendar/backends/weather/e-weather-source.c
 
new/evolution-data-server-3.34.2/src/calendar/backends/weather/e-weather-source.c
--- 
old/evolution-data-server-3.34.1/src/calendar/backends/weather/e-weather-source.c
   2019-10-07 09:13:09.000000000 +0200
+++ 
new/evolution-data-server-3.34.2/src/calendar/backends/weather/e-weather-source.c
   2019-11-22 10:34:18.000000000 +0100
@@ -193,9 +193,9 @@
                #endif
                );
                gweather_info_set_enabled_providers (source->priv->info, 
GWEATHER_PROVIDER_ALL);
-               g_signal_connect (
+               g_signal_connect_object (
                        source->priv->info, "updated",
-                       G_CALLBACK (weather_source_updated_cb), source);
+                       G_CALLBACK (weather_source_updated_cb), source, 0);
        }
 
        gweather_info_update (source->priv->info);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/evolution-data-server-3.34.1/src/calendar/libecal/e-cal-client.c 
new/evolution-data-server-3.34.2/src/calendar/libecal/e-cal-client.c
--- old/evolution-data-server-3.34.1/src/calendar/libecal/e-cal-client.c        
2019-10-07 09:13:09.000000000 +0200
+++ new/evolution-data-server-3.34.2/src/calendar/libecal/e-cal-client.c        
2019-11-22 10:34:18.000000000 +0100
@@ -2443,10 +2443,27 @@
                        }
 
                        ci->start = i_cal_time_clone 
(e_cal_component_datetime_get_value (dtstart));
+                       if (e_cal_component_datetime_get_tzid (dtstart)) {
+                               ICalTimezone *zone;
 
-                       if (dtend && e_cal_component_datetime_get_value (dtend))
+                               zone = e_cal_client_tzlookup_cb 
(e_cal_component_datetime_get_tzid (dtstart), client, NULL, NULL);
+
+                               if (zone)
+                                       i_cal_time_set_timezone (ci->start, 
zone);
+                       }
+
+                       if (dtend && e_cal_component_datetime_get_value 
(dtend)) {
                                ci->end = i_cal_time_clone 
(e_cal_component_datetime_get_value (dtend));
-                       else {
+
+                               if (e_cal_component_datetime_get_tzid (dtend)) {
+                                       ICalTimezone *zone;
+
+                                       zone = e_cal_client_tzlookup_cb 
(e_cal_component_datetime_get_tzid (dtend), client, NULL, NULL);
+
+                                       if (zone)
+                                               i_cal_time_set_timezone 
(ci->end, zone);
+                               }
+                       } else {
                                ci->end = i_cal_time_clone (ci->start);
 
                                if (i_cal_time_is_date 
(e_cal_component_datetime_get_value (dtstart)))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/evolution-data-server-3.34.1/src/calendar/libecal/e-cal-recur.c 
new/evolution-data-server-3.34.2/src/calendar/libecal/e-cal-recur.c
--- old/evolution-data-server-3.34.1/src/calendar/libecal/e-cal-recur.c 
2019-10-07 09:13:09.000000000 +0200
+++ new/evolution-data-server-3.34.2/src/calendar/libecal/e-cal-recur.c 
2019-11-22 10:34:18.000000000 +0100
@@ -715,7 +715,7 @@
                     g_object_unref (prop), prop = 
i_cal_component_get_next_property (icalcomp, I_CAL_EXDATE_PROPERTY)) {
                        ICalTime *exdate = i_cal_property_get_exdate (prop);
 
-                       if (exdate || i_cal_time_is_null_time (exdate)) {
+                       if (!exdate || i_cal_time_is_null_time (exdate)) {
                                g_clear_object (&exdate);
                                continue;
                        }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/evolution-data-server-3.34.1/src/calendar/libedata-cal/e-cal-meta-backend.c 
new/evolution-data-server-3.34.2/src/calendar/libedata-cal/e-cal-meta-backend.c
--- 
old/evolution-data-server-3.34.1/src/calendar/libedata-cal/e-cal-meta-backend.c 
    2019-10-07 09:13:09.000000000 +0200
+++ 
new/evolution-data-server-3.34.2/src/calendar/libedata-cal/e-cal-meta-backend.c 
    2019-11-22 10:34:18.000000000 +0100
@@ -817,10 +817,8 @@
        if (!meta_backend->priv->refresh_timeout_id) {
                ESource *source = e_backend_get_source (E_BACKEND 
(meta_backend));
 
-               if (e_source_has_extension (source, 
E_SOURCE_EXTENSION_REFRESH)) {
-                       meta_backend->priv->refresh_timeout_id = 
e_source_refresh_add_timeout (source, NULL,
-                               ecmb_source_refresh_timeout_cb, e_weak_ref_new 
(meta_backend), (GDestroyNotify) e_weak_ref_free);
-               }
+               meta_backend->priv->refresh_timeout_id = 
e_source_refresh_add_timeout (source, NULL,
+                       ecmb_source_refresh_timeout_cb, e_weak_ref_new 
(meta_backend), (GDestroyNotify) e_weak_ref_free);
        }
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/evolution-data-server-3.34.1/src/camel/camel-network-service.c 
new/evolution-data-server-3.34.2/src/camel/camel-network-service.c
--- old/evolution-data-server-3.34.1/src/camel/camel-network-service.c  
2019-10-07 09:13:09.000000000 +0200
+++ new/evolution-data-server-3.34.2/src/camel/camel-network-service.c  
2019-11-22 10:34:18.000000000 +0100
@@ -1113,23 +1113,28 @@
                                  gpointer user_data)
 {
        CamelSession *session;
-       gchar *description;
        GTask *task;
 
        g_return_if_fail (CAMEL_IS_NETWORK_SERVICE (service));
 
        session = camel_service_ref_session (CAMEL_SERVICE (service));
-       g_return_if_fail (session != NULL);
 
        task = g_task_new (service, cancellable, callback, user_data);
        g_task_set_source_tag (task, camel_network_service_can_reach);
 
-       description = g_strdup_printf (_("Checking reachability of account 
“%s”"), camel_service_get_display_name (CAMEL_SERVICE (service)));
+       if (session) {
+               gchar *description;
 
-       camel_session_submit_job (session, description, 
network_service_can_reach_thread, task, g_object_unref);
+               description = g_strdup_printf (_("Checking reachability of 
account “%s”"), camel_service_get_display_name (CAMEL_SERVICE (service)));
 
-       g_object_unref (session);
-       g_free (description);
+               camel_session_submit_job (session, description, 
network_service_can_reach_thread, task, g_object_unref);
+
+               g_object_unref (session);
+               g_free (description);
+       } else {
+               g_task_return_boolean (task, FALSE);
+               g_object_unref (task);
+       }
 }
 
 /**
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/evolution-data-server-3.34.1/src/libebackend/e-backend.c 
new/evolution-data-server-3.34.2/src/libebackend/e-backend.c
--- old/evolution-data-server-3.34.1/src/libebackend/e-backend.c        
2019-10-07 09:13:09.000000000 +0200
+++ new/evolution-data-server-3.34.2/src/libebackend/e-backend.c        
2019-11-22 10:34:18.000000000 +0100
@@ -438,7 +438,10 @@
                                GError *local_error2 = NULL;
 
                                if (!e_source_write_sync (source, 
thread_data->cancellable, &local_error2)) {
-                                       g_warning ("%s: Failed to store changed 
user name: %s", G_STRFUNC, local_error2 ? local_error2->message : "Unknown 
error");
+                                       g_warning ("%s: Failed to store changed 
user name on '%s' (%s): %s", G_STRFUNC,
+                                               e_source_get_display_name 
(source),
+                                               e_source_get_uid (source),
+                                               local_error2 ? 
local_error2->message : "Unknown error");
                                }
 
                                g_clear_error (&local_error2);
@@ -453,7 +456,10 @@
 
                        if (!e_source_invoke_credentials_required_sync (source, 
reason, certificate_pem, certificate_errors,
                                local_error, thread_data->cancellable, 
&local_error2)) {
-                               g_warning ("%s: Failed to invoke credentials 
required: %s", G_STRFUNC, local_error2 ? local_error2->message : "Unknown 
error");
+                               g_warning ("%s: Failed to invoke credentials 
required for '%s' (%s): %s", G_STRFUNC,
+                                       e_source_get_display_name (source),
+                                       e_source_get_uid (source),
+                                       local_error2 ? local_error2->message : 
"Unknown error");
                        }
 
                        g_clear_error (&local_error2);
@@ -1229,7 +1235,11 @@
 
        if (!e_backend_credentials_required_finish (E_BACKEND (source_object), 
result, &error) &&
            !g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) {
-               g_warning ("%s: Failed to invoke credentials required: %s", 
who_calls ? who_calls : G_STRFUNC,
+               ESource *source = e_backend_get_source (E_BACKEND 
(source_object));
+
+               g_warning ("%s: Failed to invoke credentials required on '%s' 
(%s): %s", who_calls ? who_calls : G_STRFUNC,
+                       e_source_get_display_name (source),
+                       e_source_get_uid (source),
                        error ? error->message : "Unknown error");
        }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/evolution-data-server-3.34.1/src/libedataserver/e-soup-session.c 
new/evolution-data-server-3.34.2/src/libedataserver/e-soup-session.c
--- old/evolution-data-server-3.34.1/src/libedataserver/e-soup-session.c        
2019-10-07 09:13:09.000000000 +0200
+++ new/evolution-data-server-3.34.2/src/libedataserver/e-soup-session.c        
2019-11-22 10:34:18.000000000 +0100
@@ -210,6 +210,10 @@
        if (!credentials || !e_named_parameters_exists (credentials, 
E_SOURCE_CREDENTIAL_PASSWORD)) {
                /* This error message won't get into the UI */
                g_set_error_literal (error, SOUP_HTTP_ERROR, 
SOUP_STATUS_UNAUTHORIZED, soup_status_get_phrase (SOUP_STATUS_UNAUTHORIZED));
+
+               if (message)
+                       soup_message_set_status (message, 
SOUP_STATUS_UNAUTHORIZED);
+
                return FALSE;
        }
 
@@ -279,12 +283,15 @@
        session->priv->auth_prefilled = FALSE;
        g_mutex_unlock (&session->priv->property_lock);
 
-       if (g_strcmp0 (auth_method, "OAuth2") == 0 ||
-           e_oauth2_services_is_oauth2_alias_static (auth_method)) {
-               success = e_soup_session_maybe_prepare_bearer_auth (session, 
soup_uri, message, cancellable, error);
-       } else if (user && *user) {
-               /* Default to Basic authentication when user is filled */
-               success = e_soup_session_maybe_prepare_basic_auth (session, 
soup_uri, message, user, credentials, cancellable, error);
+       /* Provide credentials beforehand only on secure connections */
+       if (soup_uri_get_scheme (soup_uri) == SOUP_URI_SCHEME_HTTPS) {
+               if (g_strcmp0 (auth_method, "OAuth2") == 0 ||
+                   e_oauth2_services_is_oauth2_alias_static (auth_method)) {
+                       success = e_soup_session_maybe_prepare_bearer_auth 
(session, soup_uri, message, cancellable, error);
+               } else if (user && *user) {
+                       /* Default to Basic authentication when user is filled 
*/
+                       success = e_soup_session_maybe_prepare_basic_auth 
(session, soup_uri, message, user, credentials, cancellable, error);
+               }
        }
 
        e_named_parameters_free (credentials);
@@ -517,6 +524,8 @@
                SOUP_SESSION_ACCEPT_LANGUAGE_AUTO, TRUE,
                NULL);
 
+       soup_session_add_feature_by_type (SOUP_SESSION (session), 
SOUP_TYPE_CONTENT_DECODER);
+
        g_signal_connect (session, "authenticate",
                G_CALLBACK (e_soup_session_authenticate_cb), NULL);
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/evolution-data-server-3.34.1/src/libedataserver/e-source.c 
new/evolution-data-server-3.34.2/src/libedataserver/e-source.c
--- old/evolution-data-server-3.34.1/src/libedataserver/e-source.c      
2019-10-07 09:13:09.000000000 +0200
+++ new/evolution-data-server-3.34.2/src/libedataserver/e-source.c      
2019-11-22 10:34:18.000000000 +0100
@@ -854,16 +854,14 @@
        return changed;
 }
 
-static gboolean
-source_idle_connection_status_change_cb (gpointer user_data)
+static void
+source_update_connection_status (ESource *source)
 {
-       ESource *source = E_SOURCE (user_data);
        EDBusObject *dbus_object;
        EDBusSource *dbus_source;
        gboolean changed = FALSE;
 
-       if (g_source_is_destroyed (g_main_current_source ()))
-               return FALSE;
+       g_return_if_fail (E_IS_SOURCE (source));
 
        g_mutex_lock (&source->priv->connection_status_change_lock);
        if (source->priv->connection_status_change != NULL) {
@@ -888,6 +886,19 @@
 
        g_mutex_unlock (&source->priv->property_lock);
        g_object_thaw_notify (G_OBJECT (source));
+}
+
+static gboolean
+source_idle_connection_status_change_cb (gpointer user_data)
+{
+       ESource *source;
+
+       if (g_source_is_destroyed (g_main_current_source ()))
+               return FALSE;
+
+       source = E_SOURCE (user_data);
+
+       source_update_connection_status (source);
 
        return FALSE;
 }
@@ -1961,6 +1972,40 @@
        return success;
 }
 
+static void
+source_connect_dbus_source (ESource *source)
+{
+       EDBusObject *dbus_object;
+       EDBusSource *dbus_source;
+
+       g_return_if_fail (E_IS_SOURCE (source));
+
+       if (!source->priv->dbus_object)
+               return;
+
+       dbus_object = E_DBUS_OBJECT (source->priv->dbus_object);
+
+       /* An EDBusObject lacking an EDBusSource
+        * interface indicates a programmer error. */
+       dbus_source = e_dbus_object_get_source (dbus_object);
+       g_return_if_fail (E_DBUS_IS_SOURCE (dbus_source));
+
+       g_signal_connect_object (
+               dbus_source, "notify::data",
+               G_CALLBACK (source_notify_dbus_data_cb), source, 0);
+       g_signal_connect_object (
+               dbus_source, "notify::connection-status",
+               G_CALLBACK (source_notify_dbus_connection_status_cb), source, 
0);
+       g_signal_connect_object (
+               dbus_source, "credentials-required",
+               G_CALLBACK (source_dbus_credentials_required_cb), source, 0);
+       g_signal_connect_object (
+               dbus_source, "authenticate",
+               G_CALLBACK (source_dbus_authenticate_cb), source, 0);
+
+       g_clear_object (&dbus_source);
+}
+
 static gboolean
 source_initable_init (GInitable *initable,
                       GCancellable *cancellable,
@@ -1993,19 +2038,7 @@
                source->priv->uid = e_dbus_source_dup_uid (dbus_source);
 
                source_update_connection_status_internal (source, dbus_source);
-
-               g_signal_connect (
-                       dbus_source, "notify::data",
-                       G_CALLBACK (source_notify_dbus_data_cb), source);
-               g_signal_connect (
-                       dbus_source, "notify::connection-status",
-                       G_CALLBACK (source_notify_dbus_connection_status_cb), 
source);
-               g_signal_connect (
-                       dbus_source, "credentials-required",
-                       G_CALLBACK (source_dbus_credentials_required_cb), 
source);
-               g_signal_connect (
-                       dbus_source, "authenticate",
-                       G_CALLBACK (source_dbus_authenticate_cb), source);
+               source_connect_dbus_source (source);
 
                success = source_parse_dbus_data (source, error);
 
@@ -2442,11 +2475,25 @@
 
        g_mutex_lock (&source->priv->property_lock);
 
+       if (source->priv->dbus_object) {
+               EDBusSource *dbus_source;
+
+               dbus_source = e_dbus_object_get_source (E_DBUS_OBJECT 
(source->priv->dbus_object));
+
+               if (dbus_source) {
+                       g_signal_handlers_disconnect_by_data (dbus_source, 
source),
+                       g_object_unref (dbus_source);
+               }
+       }
+
        g_clear_object (&source->priv->dbus_object);
        source->priv->dbus_object = dbus_object;
 
        g_mutex_unlock (&source->priv->property_lock);
 
+       source_connect_dbus_source (source);
+       source_update_connection_status (source);
+
        g_object_notify (G_OBJECT (source), "dbus-object");
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/evolution-data-server-3.34.1/tests/libecal/test-cal-recur.c 
new/evolution-data-server-3.34.2/tests/libecal/test-cal-recur.c
--- old/evolution-data-server-3.34.1/tests/libecal/test-cal-recur.c     
2019-10-07 09:13:09.000000000 +0200
+++ new/evolution-data-server-3.34.2/tests/libecal/test-cal-recur.c     
2019-11-22 10:34:18.000000000 +0100
@@ -381,6 +381,105 @@
        }
 }
 
+static gboolean
+got_instance_cb (ICalComponent *icomp,
+                ICalTime *instance_start,
+                ICalTime *instance_end,
+                gpointer user_data,
+                GCancellable *cancellable,
+                GError **error)
+{
+       gint *pfound = user_data;
+
+       (*pfound)++;
+
+       return TRUE;
+}
+
+static ICalTimezone *
+lookup_tzid_cb (const gchar *tzid,
+               gpointer lookup_data,
+               GCancellable *cancellable,
+               GError **error)
+{
+       return i_cal_timezone_get_builtin_timezone (tzid);
+}
+
+static void
+test_recur_exdate_component (const gchar *comp_str)
+{
+       ICalComponent *comp;
+       ICalTime *start, *end;
+       gint found = 0;
+       gboolean success;
+       GError *error = NULL;
+
+       comp = i_cal_component_new_from_string (comp_str);
+
+       g_assert_nonnull (comp);
+
+       start = i_cal_time_new_from_string ("20191001T000000Z");
+       end = i_cal_time_new_from_string ("20191031T235959Z");
+
+       g_assert_nonnull (start);
+       g_assert_nonnull (end);
+
+       success = e_cal_recur_generate_instances_sync (comp, start, end,
+               got_instance_cb, &found,
+               lookup_tzid_cb, NULL,
+               i_cal_timezone_get_builtin_timezone ("Europe/Berlin"),
+               NULL, &error);
+
+       g_assert_no_error (error);
+       g_assert (success);
+       g_assert_cmpint (found, ==, 2);
+
+       found = 0;
+
+       success = e_cal_recur_generate_instances_sync (comp, start, end,
+               got_instance_cb, &found,
+               lookup_tzid_cb, NULL,
+               i_cal_timezone_get_builtin_timezone ("America/New_York"),
+               NULL, &error);
+
+       g_assert_no_error (error);
+       g_assert (success);
+       g_assert_cmpint (found, ==, 2);
+
+       g_object_unref (start);
+       g_object_unref (end);
+       g_object_unref (comp);
+}
+
+static void
+test_recur_exdate (ETestServerFixture *fixture,
+                  gconstpointer user_data)
+{
+       test_recur_exdate_component (
+               "BEGIN:VEVENT\r\n"
+               "UID:007\r\n"
+               "DTSTART;TZID=Europe/Amsterdam:20191010T120000\r\n"
+               "DTEND;TZID=Europe/Amsterdam:20191010T170000\r\n"
+               "SUMMARY:Test\r\n"
+               "RRULE:FREQ=DAILY;COUNT=4\r\n"
+               "EXDATE;VALUE=DATE:20191011\r\n"
+               "EXDATE:20191012T100000Z\r\n"
+               "END:VEVENT\r\n"
+       );
+
+       test_recur_exdate_component (
+               "BEGIN:VEVENT\r\n"
+               "UID:007\r\n"
+               "DTSTART:20191010T120000\r\n"
+               "DTEND:20191010T170000\r\n"
+               "SUMMARY:Test\r\n"
+               "RRULE:FREQ=DAILY;COUNT=4\r\n"
+               "EXDATE;VALUE=DATE:20191011\r\n"
+               "EXDATE:20191012T120000\r\n"
+               "END:VEVENT\r\n"
+       );
+}
+
 gint
 main (gint argc,
       gchar **argv)
@@ -402,6 +501,13 @@
                e_test_server_utils_setup,
                test_recur_client,
                e_test_server_utils_teardown);
+       g_test_add (
+               "/ECalRecur/Exdate",
+               ETestServerFixture,
+               &test_closure,
+               e_test_server_utils_setup,
+               test_recur_exdate,
+               e_test_server_utils_teardown);
 
        return e_test_server_utils_run ();
 }


Reply via email to