pseudo-DCE-ish UUID's.
$Log$
+Revision 524.5 2004/10/15 03:10:24 ajc
+* Calendar objects UID now generated by generate_uuid() which creates
+ pseudo-DCE-ish UUID's.
+
Revision 524.4 2004/10/05 01:59:31 ajc
* localtime_r() fixes
1998-12-03 Nathan Bryant <bryant@cs.usm.maine.edu>
* webserver.c: warning fix
+
lprintf(9, "Give this task a UID if it doesn't have one.\n");
if (icalcomponent_get_first_property(vtodo,
ICAL_UID_PROPERTY) == NULL) {
- generate_new_uid(buf);
+ generate_uuid(buf);
icalcomponent_add_property(vtodo,
icalproperty_new_uid(buf)
);
}
-/*
- * Generate a new, globally unique UID parameter for a calendar object.
- */
-void generate_new_uid(char *buf) {
- static int seq = 0;
-
- sprintf(buf, "%ld-%d@%s",
- (long)time(NULL),
- (seq++),
- serv_info.serv_fqdn);
-}
-
/*
* Render a PARTSTAT parameter as a string (and put it in parentheses)
*/
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)
);
}
}
}
+
+
+/*
+ * Generate a new, globally unique UID parameter for a calendar etc. object
+ */
+void generate_uuid(char *buf) {
+ static int seq = 0;
+
+ sprintf(buf, "{%08x-%04x-%04x-%04x-%012x}",
+ (int)time(NULL),
+ (seq++),
+ getpid(),
+ rand(),
+ rand()
+ );
+}
+
void set_room_policy(void);
void display_inetconf(void);
void save_inetconf(void);
+void generate_uuid(char *);
#ifdef WEBCIT_WITH_CALENDAR_SERVICE
struct icaltimetype icaltime_from_webform(char *prefix);
void display_edit_individual_event(icalcomponent *supplied_vtodo, long msgnum);
void save_individual_event(icalcomponent *supplied_vtodo, long msgnum);
-void generate_new_uid(char *);
void respond_to_request(void);
void handle_rsvp(void);
void ical_dezonify(icalcomponent *cal);