[evolution-exchange] Bug #656806 - Public calendar can be accessed only after restart
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-exchange] Bug #656806 - Public calendar can be accessed only after restart
- Date: Mon, 26 Sep 2011 08:18:11 +0000 (UTC)
commit 12d50f5ff455a43b5baef0b094f8011269505c20
Author: Punit Jain <jpunit novell com>
Date: Mon Sep 26 10:17:42 2011 +0200
Bug #656806 - Public calendar can be accessed only after restart
calendar/e-cal-backend-exchange.c | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
---
diff --git a/calendar/e-cal-backend-exchange.c b/calendar/e-cal-backend-exchange.c
index 00afc6d..dee71c3 100644
--- a/calendar/e-cal-backend-exchange.c
+++ b/calendar/e-cal-backend-exchange.c
@@ -484,7 +484,7 @@ authenticate_user (ECalBackendSync *backend,
cbex->folder = exchange_account_get_folder (cbex->account, uristr);
if (!cbex->folder) {
ESource *source;
- const gchar *foreign;
+ const gchar *foreign, *favorite;
ExchangeHierarchy *hier_to_rescan = NULL;
/* FIXME: theoretically we should create it if
* only_if_exists is FALSE.
@@ -492,6 +492,7 @@ authenticate_user (ECalBackendSync *backend,
source = e_cal_backend_get_source (E_CAL_BACKEND (cbex));
foreign = e_source_get_property (source, "foreign");
+ favorite = g_strrstr (uristr, ";favorites");
if (foreign && (g_str_equal (foreign, "1"))) {
gchar **split_path;
@@ -511,6 +512,14 @@ authenticate_user (ECalBackendSync *backend,
}
g_strfreev (split_path);
+ } else if (favorite) {
+ /* Rescan to see if this is a newly subscribed calendar */
+ hier_to_rescan = exchange_account_get_hierarchy_by_type (cbex->account, EXCHANGE_HIERARCHY_FAVORITES);
+ if (!hier_to_rescan) {
+ g_mutex_unlock (cbex->priv->open_lock);
+ g_propagate_error (perror, EDC_ERROR (RepositoryOffline));
+ return;
+ }
} else {
/* Rescan to see if this is any new calendar */
hier_to_rescan = exchange_account_get_hierarchy_by_type (cbex->account, EXCHANGE_HIERARCHY_PERSONAL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]