projects
/
citadel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Reinstated the use of EUID/UUID in blog posts; however this time they are not being...
[citadel.git]
/
libcitadel
/
lib
/
tools.c
diff --git
a/libcitadel/lib/tools.c
b/libcitadel/lib/tools.c
index db8fe3af8f2809f79c1b78808c86bd547a18d7fd..0c012e7955e184d128b589ad547b1bf645ebb767 100644
(file)
--- a/
libcitadel/lib/tools.c
+++ b/
libcitadel/lib/tools.c
@@
-858,8
+858,11
@@
char *strcpy(char *dest, const char *src) {
* Generate a new, globally unique UID parameter for a calendar etc. object
*/
void generate_uuid(char *buf) {
- static int seq =
0
;
+ static int seq =
(-1)
;
+ if (seq == (-1)) {
+ seq = (int)rand();
+ }
++seq;
seq = (seq % 0x0FFF) ;