* src/ejabberd_c2s.erl: Enable zlib only over TCP

SVN Revision: 522
This commit is contained in:
Alexey Shchepin 2006-03-25 21:16:49 +00:00
parent 89e57d421e
commit 832279f1f2
2 changed files with 6 additions and 2 deletions

View File

@ -1,3 +1,7 @@
2006-03-25 Alexey Shchepin <alexey@sevcom.net>
* src/ejabberd_c2s.erl: Enable zlib only over TCP
2006-03-18 Alexey Shchepin <alexey@sevcom.net>
* src/ejabberd_c2s.erl: Bugfix (thanks to Sergei Golovan)

View File

@ -208,7 +208,7 @@ wait_for_stream({xmlstreamstart, _Name, Attrs}, StateData) ->
Zlib = StateData#state.zlib,
CompressFeature =
case Zlib andalso
(SockMod /= ejabberd_zlib) of
(SockMod == gen_tcp) of
true ->
[{xmlelement, "compression",
[{"xmlns", ?NS_FEATURE_COMPRESS}],
@ -516,7 +516,7 @@ wait_for_feature_request({xmlstreamelement, El}, StateData) ->
tls_enabled = true
}};
{?NS_COMPRESS, "compress"} when Zlib == true,
SockMod /= ejabberd_zlib ->
SockMod == gen_tcp ->
case xml:get_subtag(El, "method") of
false ->
send_element(StateData,