[evolution-ews] notification: Try to re-subscribe in case of failure
- From: Fabiano Fidêncio <ffidencio src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-ews] notification: Try to re-subscribe in case of failure
- Date: Tue, 7 Apr 2015 11:24:59 +0000 (UTC)
commit 6d637ec54f17b096577850798a27802424301cec
Author: Fabiano Fidêncio <fidencio redhat com>
Date: Tue Apr 7 10:28:50 2015 +0200
notification: Try to re-subscribe in case of failure
Related to: https://bugzilla.gnome.org/show_bug.cgi?id=746513
src/server/e-ews-notification.c | 15 ++++++++++++++-
1 files changed, 14 insertions(+), 1 deletions(-)
---
diff --git a/src/server/e-ews-notification.c b/src/server/e-ews-notification.c
index 674440f..4cd2bf0 100644
--- a/src/server/e-ews-notification.c
+++ b/src/server/e-ews-notification.c
@@ -795,8 +795,21 @@ e_ews_notification_get_events_thread (gpointer user_data)
ret = e_ews_notification_get_events_sync (
td->notification,
subscription_id);
- } while (ret);
+ if (!ret) {
+ g_debug ("%s: Failed to get notification events (SubscriptionId: '%s')", G_STRFUNC,
subscription_id);
+
+ e_ews_notification_unsubscribe_folder_sync (td->notification, subscription_id);
+ g_free (subscription_id);
+
+ ret = e_ews_notification_subscribe_folder_sync (td->notification, td->folders,
&subscription_id, td->cancellable);
+ if (ret) {
+ g_debug ("%s: Re-subscribed to get notifications events (SubscriptionId:
'%s')", G_STRFUNC, subscription_id);
+ } else {
+ g_debug ("%s: Failed to re-subscribed to get notifications events",
G_STRFUNC);
+ }
+ }
+ } while (ret);
exit:
if (subscription_id != NULL) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]