[dovecot/core] c104ea: lib: guid_128_generate() needs to correctly conver...

GitHub noreply at github.com
Wed Jun 7 16:30:12 EEST 2017


  Branch: refs/heads/master
  Home:   https://github.com/dovecot/core
  Commit: c104ea8f180db4be2b491ef5b1f2626958dce80d
      https://github.com/dovecot/core/commit/c104ea8f180db4be2b491ef5b1f2626958dce80d
  Author: Josef 'Jeff' Sipek <jeff.sipek at dovecot.fi>
  Date:   2017-06-07 (Wed, 07 Jun 2017)

  Changed paths:
    M src/lib/guid.c

  Log Message:
  -----------
  lib: guid_128_generate() needs to correctly convert usecs to nsecs

The timestamp in the guid starts off with real time, but "runs ahead" if a lot
of guids are generated.  If not many guids are being generated, the timestamp
is fast-forwarded to the current ioloop_timeval.  The buggy comparison prevented
fast forwarding when tv_sec matched, but tv_nsec value was > 0 (which
was true most of the time).


  Commit: 8b2aaea36ac44fc0a07996333ae8565a4e80ea18
      https://github.com/dovecot/core/commit/8b2aaea36ac44fc0a07996333ae8565a4e80ea18
  Author: Josef 'Jeff' Sipek <jeff.sipek at dovecot.fi>
  Date:   2017-06-07 (Wed, 07 Jun 2017)

  Changed paths:
    M src/lib/guid.c

  Log Message:
  -----------
  lib: guid_128_generate() shouldn't generate invalid timestamps

The nsec validity check must take into account the soon-to-be-done increment.


  Commit: c536bf22651c97ad0369864897f1920625e53ea9
      https://github.com/dovecot/core/commit/c536bf22651c97ad0369864897f1920625e53ea9
  Author: Josef 'Jeff' Sipek <jeff.sipek at dovecot.fi>
  Date:   2017-06-07 (Wed, 07 Jun 2017)

  Changed paths:
    M src/lib/test-guid.c

  Log Message:
  -----------
  lib: test for guid_128_generate() time handling

Make sure that guids always increase regardless of what is happening to
the time.


Compare: https://github.com/dovecot/core/compare/e8760ad579ca...c536bf22651c


More information about the dovecot-cvs mailing list