]> code.citadel.org Git - citadel.git/blobdiff - webcit/event.c
* Calendar objects UID now generated by generate_uuid() which creates
[citadel.git] / webcit / event.c
index d7ed702a619aa9cc0e6431d1f49bfe3ba24fae32..b9ea1fea389e4a7f37e63bbd15cc6489dbbaad79 100644 (file)
@@ -145,7 +145,7 @@ void display_edit_individual_event(icalcomponent *supplied_vevent, long msgnum)
                }
        }
        else {
-               memcpy(&tm_now, localtime(&now), sizeof(struct tm));
+               localtime_r(&now, &tm_now);
                tm_now.tm_year = atoi(bstr("year")) - 1900;
                tm_now.tm_mon = atoi(bstr("month")) - 1;
                tm_now.tm_mday = atoi(bstr("day"));
@@ -556,7 +556,7 @@ void save_individual_event(icalcomponent *supplied_vevent, long msgnum) {
                lprintf(9, "Give this event a UID if it doesn't have one.\n");
                if (icalcomponent_get_first_property(vevent,
                   ICAL_UID_PROPERTY) == NULL) {
-                       generate_new_uid(buf);
+                       generate_uuid(buf);
                        icalcomponent_add_property(vevent,
                                icalproperty_new_uid(buf)
                        );