25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-22 16:20:52 +01:00

Fix zlib compression connection (EJAB-1448)

This commit is contained in:
Badlop 2011-09-03 00:06:53 +02:00
parent ad6218cdf2
commit adc4a7f67c

View File

@ -788,9 +788,11 @@ wait_for_feature_request({xmlstreamelement, #xmlel{ns = NS, name = Name} = El},
fsm_next_state(wait_for_feature_request, StateData);
<<"zlib">> ->
Socket = StateData#state.socket,
Compressed = exmpp_xml:node_to_list(
exmpp_server_compression:compressed(), [?DEFAULT_NS], ?PREFIXED_NS),
ZlibSocket = (StateData#state.sockmod):compress(
Socket,
exmpp_server_compression:compressed()),
Compressed),
fsm_next_state(wait_for_stream,
StateData#state{socket = ZlibSocket,
streamid = new_id()