[dovecot/core] 207b9e: imap: NOTIFY - Fix delayed setting notification ca...

GitHub noreply at github.com
Mon Jun 19 11:30:13 EEST 2017


  Branch: refs/heads/master-2.2
  Home:   https://github.com/dovecot/core
  Commit: 207b9ed6dd75e43ad795be183fa2d04c6973c8f2
      https://github.com/dovecot/core/commit/207b9ed6dd75e43ad795be183fa2d04c6973c8f2
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2017-06-19 (Mon, 19 Jun 2017)

  Changed paths:
    M src/imap/imap-notify.c

  Log Message:
  -----------
  imap: NOTIFY - Fix delayed setting notification callback

This was done in command-post hook, but then when command was soon freed the
callback was immediately added.


  Commit: cdad30b75983eacefd61ce98220ff79f20887ef6
      https://github.com/dovecot/core/commit/cdad30b75983eacefd61ce98220ff79f20887ef6
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2017-06-19 (Mon, 19 Jun 2017)

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

  Log Message:
  -----------
  imap: NOTIFY - Fix crash due to not hooking into commands correctly

The pre/post hooks aren't always called immediately when commands are
created. They're called only after the command input is being read.
Call notify hooks explicitly now immediately when commands are allocated.

Fixes a panic with for example:

a notify set (selected (Messagenew (uid flags) MessageExpunge FlagChange) personal (MessageNew MessageExpunge FlagChange))
b select inbox
c store 1 +flags \deleted
d expunge
e append inbox {10}

Which crashed with:
Panic: file imap-notify.c: line 397 (imap_notify_callback): assertion failed: (client->command_queue_size == 0)


  Commit: 48aca45cac0f4edce7fa6ecc6aa23ff20e56867e
      https://github.com/dovecot/core/commit/48aca45cac0f4edce7fa6ecc6aa23ff20e56867e
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2017-06-19 (Mon, 19 Jun 2017)

  Changed paths:
    M src/imap/imap-notify.c

  Log Message:
  -----------
  imap: NOTIFY - Cleanup notify watch timeout handling

It's not useful to set the timeout until all the commands are finished.


Compare: https://github.com/dovecot/core/compare/d0045d3b8456...48aca45cac0f


More information about the dovecot-cvs mailing list