[evolution-data-server] [http calendar] Add UID to the component, if missing



commit 513a9e8444db4fdb6ab352e55cb9b11c4f77ac8a
Author: Milan Crha <mcrha redhat com>
Date:   Tue May 5 08:06:39 2015 +0200

    [http calendar] Add UID to the component, if missing
    
    There can be calendars with events without set UID, thus add it,
    similar as the local calendar adds it, to be able to show the calendar
    content.

 calendar/backends/http/e-cal-backend-http.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/calendar/backends/http/e-cal-backend-http.c b/calendar/backends/http/e-cal-backend-http.c
index 5110d9a..e4f9afd 100644
--- a/calendar/backends/http/e-cal-backend-http.c
+++ b/calendar/backends/http/e-cal-backend-http.c
@@ -686,9 +686,9 @@ cal_backend_http_load (ECalBackendHttp *backend,
                subcomp_kind = icalcomponent_isa (subcomp);
                prop = icalcomponent_get_first_property (subcomp, ICAL_UID_PROPERTY);
                if (!prop && subcomp_kind == kind) {
-                       g_warning (" The component does not have the  mandatory property UID \n");
-                       subcomp = icalcomponent_get_next_component (icalcomp, ICAL_ANY_COMPONENT);
-                       continue;
+                       gchar *new_uid = e_cal_component_gen_uid ();
+                       icalcomponent_set_uid (subcomp, new_uid);
+                       g_free (new_uid);
                }
 
                if (subcomp_kind == kind) {


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