]> 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 2ee0040524b893cfe980dbf480544dd1a3db44f0..b9ea1fea389e4a7f37e63bbd15cc6489dbbaad79 100644 (file)
@@ -46,8 +46,8 @@ void display_edit_individual_event(icalcomponent *supplied_vevent, long msgnum)
        icalproperty *attendee = NULL;
        char attendee_string[SIZ];
        char buf[SIZ];
-       int i;
        int organizer_is_me = 0;
+       int i;
        int sequence = 0;
 
        now = time(NULL) % 60;          /* mod 60 to force :00 seconds */
@@ -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)
                        );