[dovecot/core] 36aa1b: lib: istream-multiplex - Forward i_stream_switch_i...

GitHub noreply at github.com
Mon Oct 9 14:00:10 EEST 2017


  Branch: refs/heads/master
  Home:   https://github.com/dovecot/core
  Commit: 36aa1b351b8e9d02a93aa17e5de8a06ac5440084
      https://github.com/dovecot/core/commit/36aa1b351b8e9d02a93aa17e5de8a06ac5440084
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2017-10-09 (Mon, 09 Oct 2017)

  Changed paths:
    M src/lib/istream-multiplex.c

  Log Message:
  -----------
  lib: istream-multiplex - Forward i_stream_switch_ioloop() to parent

Most istreams do this because istream_private.parent is set to the parent
stream, but this can't be done with istream-multiplex. The main problem
with attempting to do the same with istream-multiplex is that the different
channels don't share the same I/O. Just because one channel received data
doesn't mean that other channels received any data. (It would be possible
to solve this by implementing a new method that allows overriding
i_stream_set_io(), but I'm not sure if that's a good idea either.)


  Commit: 0bb5678d8e52e006c68203594ce48485a8682b79
      https://github.com/dovecot/core/commit/0bb5678d8e52e006c68203594ce48485a8682b79
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2017-10-09 (Mon, 09 Oct 2017)

  Changed paths:
    M src/lib/ostream-multiplex.c

  Log Message:
  -----------
  lib: ostream-multiplex - set ostream_private.parent

Unlike with istream-multiplex, there are no issues with I/Os. Only the
parent stream will have the I/O. Using the default parent adds the
missing methods that otherwise would have needed to be implemented:
 - cork
 - flush_pending
 - switch_ioloop


Compare: https://github.com/dovecot/core/compare/f2de2be0e345...0bb5678d8e52


More information about the dovecot-cvs mailing list