[evolution-ews] Cannot create appointments (regression from bug #702922)



commit 286ab97d76d02a6c6a77ad919dc9d87703536d4b
Author: Milan Crha <mcrha redhat com>
Date:   Fri Aug 16 11:41:26 2013 +0200

    Cannot create appointments (regression from bug #702922)

 src/calendar/e-cal-backend-ews-utils.c |   13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletions(-)
---
diff --git a/src/calendar/e-cal-backend-ews-utils.c b/src/calendar/e-cal-backend-ews-utils.c
index a326391..36116cc 100644
--- a/src/calendar/e-cal-backend-ews-utils.c
+++ b/src/calendar/e-cal-backend-ews-utils.c
@@ -65,8 +65,16 @@ e_ews_collect_attendees (icalcomponent *comp,
                prop = icalcomponent_get_next_property (comp, ICAL_ATTENDEE_PROPERTY)) {
 
                str = icalproperty_get_attendee (prop);
+
+               if (!str || !*str)
+                       continue;
+
                /* figure the email address of the attendee, discard "mailto:"; if it's there */
-               if (!g_ascii_strncasecmp (str, "mailto:";, 7)) str = (str) + 7;
+               if (!g_ascii_strncasecmp (str, "mailto:";, 7))
+                       str = (str) + 7;
+
+               if (!*str)
+                       continue;
 
                /* if this attenddee is the orgenizer - dont add him/her
                 in some cases there is no maito for email if meeting orginazer */
@@ -756,6 +764,9 @@ e_ews_collect_organizer (icalcomponent *comp)
        else
                org_email_address = org;
 
+       if (org_email_address && !*org_email_address)
+               org_email_address = NULL;
+
        return org_email_address;
 }
 


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