dav/sync.c

changeset 514
4b84437b2167
parent 513
893a659768b3
child 516
39f5f17c3bc3
equal deleted inserted replaced
513:893a659768b3 514:4b84437b2167
2108 unsigned char name_prefix[8]; 2108 unsigned char name_prefix[8];
2109 memset(name_prefix, 0, 8); 2109 memset(name_prefix, 0, 8);
2110 dav_rand_bytes(name_prefix, 8); 2110 dav_rand_bytes(name_prefix, 8);
2111 char *pre = util_hexstr(name_prefix, 8); 2111 char *pre = util_hexstr(name_prefix, 8);
2112 int64_t ts = (int64_t)time(NULL); 2112 int64_t ts = (int64_t)time(NULL);
2113 int w = snprintf(buf, len, "%s-%"PRId64"\0", pre, ts); 2113 int w = snprintf(buf, len, "%s-%"PRId64"%c", pre, ts, '\0');
2114 free(pre); 2114 free(pre);
2115 return w >= len; 2115 return w >= len;
2116 } 2116 }
2117 2117
2118 #define VBEGIN_ERROR_MKCOL 1 2118 #define VBEGIN_ERROR_MKCOL 1

mercurial