25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-12-22 17:28:25 +01:00

Bugfix http-poll for correctly parsing binary (thanks to Peter Lemenkov)

This commit is contained in:
Badlop 2010-08-19 17:37:21 +02:00
parent 3024bb0cbf
commit d87fff1a4c

View File

@ -272,7 +272,13 @@ handle_event(_Event, StateName, StateData) ->
%% {stop, Reason, Reply, NewStateData}
%%----------------------------------------------------------------------
handle_sync_event({send, Packet}, _From, StateName, StateData) ->
Output = StateData#state.output ++ [lists:flatten(Packet)],
Packet2 = if
is_binary(Packet) ->
binary_to_list(Packet);
true ->
Packet
end,
Output = StateData#state.output ++ [lists:flatten(Packet2)],
Reply = ok,
{reply, Reply, StateName, StateData#state{output = Output}};