Allow for clients to negotiate whether compression is used
authorMichael Marley <michael@michaelmarley.com>
Mon, 24 Feb 2014 14:12:27 +0000 (14:12 +0000)
committerManuel Nickschas <sputnick@quassel-irc.org>
Mon, 24 Feb 2014 23:16:44 +0000 (00:16 +0100)
Previously, streaming compression would always be used for the
datastream protocol and never for the legacy protocol, regardless
of whether the client set the compression bit during the handshake.
This patch enables negotiation of compression support and also
allows for streaming compression when using the legacy protocol
with the new handshake.

As is, this patch prevents clients with streaming compression
support but without this patch from connecting to cores with this
patch.  This problem occurs because the above-mentioned clients
never set the compression bit during the handshake, which didn't
cause a problem before because both sides unconditionally enabled
compression.  However, when connecting to a core with this patch,
such a client will request no compression and the core will
disable compression.  However, the client will still enable the
compression anyway, causing the connection to fail.


No differences found