Fix db id generation in case of clock discontinuity.

Thanks to Rebecca Gellman.
pull/2756/head
Roger A. Light 4 years ago
parent 5fb4b05d8f
commit 9738406414

@ -902,7 +902,7 @@ uint64_t db__new_msg_id(void)
tmp = (nsec & 0x7FFFFF80); /* top 23-bits of the bottom 30 bits (1 billion ns), ~100 ns resolution */
id = id | (tmp >> 7);
while(id <= db.last_db_id){
if(id <= db.last_db_id){
id++;
}
db.last_db_id = id;

Loading…
Cancel
Save