[dovecot/core] 905627: imap: Fix sending UID only when necessary on broke...

GitHub noreply at github.com
Sun Feb 19 14:30:10 UTC 2017


  Branch: refs/heads/master
  Home:   https://github.com/dovecot/core
  Commit: 905627a760ce8bf4141b361f72858a99975ded3c
      https://github.com/dovecot/core/commit/905627a760ce8bf4141b361f72858a99975ded3c
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2017-02-19 (Sun, 19 Feb 2017)

  Changed paths:
    M src/imap/imap-fetch.c
    M src/imap/imap-fetch.h

  Log Message:
  -----------
  imap: Fix sending UID only when necessary on broken FETCHes.

b748f91d0677fffaa2208b39ebb6db3aeb2e937b changed UID to be sent for most
FETCH replies. There was also some existing code that attempted to do this,
but didn't fully work.

So now:

1) If there are no non-buffered replies, the entire FETCH response isn't
sent.

2) If the buffer was already flushed and nothing else was sent, add UID to
reply. The code paths for handling this are differently for
imap_fetch_failure = disconnect-immediately vs others (depending on
imap_fetch_cur_failed() return value).


  Commit: 46e17407ed48155ac7290a992216a11b2b2b3cf4
      https://github.com/dovecot/core/commit/46e17407ed48155ac7290a992216a11b2b2b3cf4
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2017-02-19 (Sun, 19 Feb 2017)

  Changed paths:
    M src/imap/imap-fetch.c
    M src/imap/imap-fetch.h

  Log Message:
  -----------
  imap: Code cleanup - Remove duplicate flags from imap_fetch_state

All the cur_flushed, line_partial and line_finished were about the same
thing.


  Commit: 43b95471c46f3d30b4c7e544acb5f0f2030ca2e0
      https://github.com/dovecot/core/commit/43b95471c46f3d30b4c7e544acb5f0f2030ca2e0
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2017-02-19 (Sun, 19 Feb 2017)

  Changed paths:
    M src/lib-fs/fs-posix.c

  Log Message:
  -----------
  fs-posix: Add "no-fsync" parameter.

This disables calling fdatasync() when fs_write() was done with
FS_OPEN_FLAG_FSYNC. Useful for making tests faster.


  Commit: 798530867beda2d2d9a8ec194ea701adef74e737
      https://github.com/dovecot/core/commit/798530867beda2d2d9a8ec194ea701adef74e737
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2017-02-19 (Sun, 19 Feb 2017)

  Changed paths:
    M src/lib-storage/mail-storage-hooks.c

  Log Message:
  -----------
  lib-storage: Assert-crash if duplicate internal hooks are added.


  Commit: 073353fe5b7ddbc44fd2b099e023b84254041083
      https://github.com/dovecot/core/commit/073353fe5b7ddbc44fd2b099e023b84254041083
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2017-02-19 (Sun, 19 Feb 2017)

  Changed paths:
    M src/lib-storage/mail-storage-service.c
    M src/lib-storage/mail-storage.c

  Log Message:
  -----------
  lib-storage: mail_storage_init/deinit() is now reference counted.

This allows calling them multiple times and only the final deinit frees the
data.


  Commit: b4adb461ce12bf578d2d70806b205cf3cbf1a51d
      https://github.com/dovecot/core/commit/b4adb461ce12bf578d2d70806b205cf3cbf1a51d
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2017-02-19 (Sun, 19 Feb 2017)

  Changed paths:
    M src/doveadm/doveadm-mail.c

  Log Message:
  -----------
  doveadm: Add explicit mail_storage_init/deinit() calls

This mainly prevents losing hooks that were registered by doveadm plugins.

Otherwise what happens is:
 - mail_plugins are unloaded and they unregister their hooks
 - doveadm plugins (e.g. doveadm_sieve) are NOT unloaded
 - mail_storage_deinit() frees all the registered hooks
 - next mail_storage_init() initializes all new hooks
 - All mail_plugins are loaded and they register again their hooks
 - doveadm plugins are NOT re-loaded or re-initialized, so their existing
hooks were lost.


  Commit: b98f1ffc049e8c4c1677173ea65830aa07b3ef87
      https://github.com/dovecot/core/commit/b98f1ffc049e8c4c1677173ea65830aa07b3ef87
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2017-02-19 (Sun, 19 Feb 2017)

  Changed paths:
    M src/imap/imap-client.c
    M src/imap/imap-client.h
    M src/imap/imap-commands.c
    M src/imap/imap-commands.h

  Log Message:
  -----------
  imap: Fix running time in tagged command replies.

The timing information was updated only after command_exec() returned.
Most of the commands were handled within a single command_exec() though,
so at the time when tagline was sent the running_usecs was still zero.

The msecs in ioloop timing was correct though, because it relied only on
the command start timing info.


Compare: https://github.com/dovecot/core/compare/9036b11c0f06...b98f1ffc049e


More information about the dovecot-cvs mailing list