From 7131dc0430636d25c094e2cc30ab5466ba96eee5 Mon Sep 17 00:00:00 2001 From: Stefan Becker Date: Fri, 5 Sep 2014 15:32:14 +0300 Subject: [PATCH] ucs: only initialize when contact list is migrated commit a58344becf4d0bc0518262492c3b9a79020120c4 changed UCS to always fully initialize, because we needed it for buddy photos. That reason went away with commit ce3df80c38e07f8879fb52a15467f5268fcba040. --- src/core/sipe-ucs.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/src/core/sipe-ucs.c b/src/core/sipe-ucs.c index e9c5c02c..229f37d0 100644 --- a/src/core/sipe-ucs.c +++ b/src/core/sipe-ucs.c @@ -704,7 +704,6 @@ void sipe_ucs_init(struct sipe_core_private *sipe_private, gboolean migrated) { struct sipe_ucs *ucs; - const gchar *ews_url; if (sipe_private->ucs) { struct sipe_ucs *ucs = sipe_private->ucs; @@ -734,14 +733,17 @@ void sipe_ucs_init(struct sipe_core_private *sipe_private, sipe_ucs_transaction(sipe_private); ucs->default_transaction = ucs->transactions; - /* user specified a service URL? */ - ews_url = sipe_backend_setting(SIPE_CORE_PUBLIC, SIPE_SETTING_EMAIL_URL); - if (is_empty(ews_url)) - sipe_ews_autodiscover_start(sipe_private, - ucs_ews_autodiscover_cb, - NULL); - else - ucs_set_ews_url(sipe_private, ews_url); + if (migrated) { + /* user specified a service URL? */ + const gchar *ews_url = sipe_backend_setting(SIPE_CORE_PUBLIC, SIPE_SETTING_EMAIL_URL); + + if (is_empty(ews_url)) + sipe_ews_autodiscover_start(sipe_private, + ucs_ews_autodiscover_cb, + NULL); + else + ucs_set_ews_url(sipe_private, ews_url); + } } void sipe_ucs_free(struct sipe_core_private *sipe_private) -- 2.11.4.GIT