[evolution-ews] Fix Tasks sync (Bug 655768). Tasks created in Outlook shown as regular tasks. Due to bug in libxml-t



commit 5d69f86807526dfbc97775f3963933fd8771b3a9
Author: Pavel Ocheretny <pocheretny src gnome org>
Date:   Tue Aug 9 00:14:46 2011 +0300

    Fix Tasks sync (Bug 655768). Tasks created in Outlook shown as regular tasks.
    Due to bug in libxml-tree function does not always return NULL if no content is available, we are checking for "" string

 src/calendar/e-cal-backend-ews.c |    2 +-
 src/server/e-ews-item.c          |    4 +++-
 2 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/calendar/e-cal-backend-ews.c b/src/calendar/e-cal-backend-ews.c
index 2ce4c80..44086aa 100644
--- a/src/calendar/e-cal-backend-ews.c
+++ b/src/calendar/e-cal-backend-ews.c
@@ -2718,7 +2718,7 @@ add_item_to_cache (ECalBackendEws *cbews, EEwsItem *item)
 		icalcomponent_add_property (icalcomp, icalprop);
 
 		/*task assaingments*/
-		if (!(e_ews_item_get_delegator (item)== NULL)) {
+		if (e_ews_item_get_delegator (item)!= NULL) {
 			const char *task_owner = e_ews_item_get_delegator (item);
 			GSList *mailboxes = NULL, *l;
 			GError *error = NULL;
diff --git a/src/server/e-ews-item.c b/src/server/e-ews-item.c
index 97c13af..6c2db5d 100644
--- a/src/server/e-ews-item.c
+++ b/src/server/e-ews-item.c
@@ -845,9 +845,11 @@ parse_task_field (EEwsItem *item, const gchar *name, ESoapParameter *subparam)
 	} else if (!g_ascii_strcasecmp (name, "Owner")) {
 		priv->task_fields->owner = e_soap_parameter_get_string_value (subparam);
 	} else if (!g_ascii_strcasecmp (name, "Delegator")) {
+		priv->task_fields->delegator = NULL;
 		priv->task_fields->delegator = e_soap_parameter_get_string_value (subparam);
+		if (!g_ascii_strcasecmp (priv->task_fields->delegator,""))
+			priv->task_fields->delegator = NULL;
 	}
-
 }
 
 static gboolean



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]