提交 638790af authored 作者: Michael Jerris's avatar Michael Jerris

make uuids a bit less likely to collide

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16066 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 74f2573a
Wed May 13 10:54:08 CDT 2009 Mon Dec 28 14:55:57 EST 2009
...@@ -201,7 +201,7 @@ APU_DECLARE(void) apr_uuid_get(apr_uuid_t *uuid) ...@@ -201,7 +201,7 @@ APU_DECLARE(void) apr_uuid_get(apr_uuid_t *uuid)
d[7] = (unsigned char)(timestamp >> 48); d[7] = (unsigned char)(timestamp >> 48);
d[6] = (unsigned char)(((timestamp >> 56) & 0x0F) | 0x10); d[6] = (unsigned char)(((timestamp >> 56) & 0x0F) | 0x10);
/* clock_seq_hi_and_reserved, uint8 */ /* clock_seq_hi_and_reserved, uint8 */
d[8] = (unsigned char)(((uuid_state_seqnum >> 8) & 0x3F) | 0x80); d[8] = (unsigned char)(((++uuid_state_seqnum >> 8) & 0x3F) | 0x80);
/* clock_seq_low, uint8 */ /* clock_seq_low, uint8 */
d[9] = (unsigned char)uuid_state_seqnum; d[9] = (unsigned char)uuid_state_seqnum;
/* node, byte[6] */ /* node, byte[6] */
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论