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

removed pretty printer from debug

SVN Revision: 2599
This commit is contained in:
Evgeniy Khramtsov 2009-09-15 11:11:49 +00:00
parent 717837172c
commit ff1622c658

View File

@ -75,10 +75,10 @@ socket_type() ->
udp_recv(Sock, Addr, Port, Data, _Opts) -> udp_recv(Sock, Addr, Port, Data, _Opts) ->
case stun_codec:decode(Data) of case stun_codec:decode(Data) of
{ok, Msg, <<>>} -> {ok, Msg, <<>>} ->
?DEBUG("got:~n~s", [stun_codec:pp(Msg)]), ?DEBUG("got:~n~p", [Msg]),
case process(Addr, Port, Msg) of case process(Addr, Port, Msg) of
RespMsg when is_record(RespMsg, stun) -> RespMsg when is_record(RespMsg, stun) ->
?DEBUG("sent:~n~s", [stun_codec:pp(RespMsg)]), ?DEBUG("sent:~n~p", [RespMsg]),
Data1 = stun_codec:encode(RespMsg), Data1 = stun_codec:encode(RespMsg),
gen_udp:send(Sock, Addr, Port, Data1); gen_udp:send(Sock, Addr, Port, Data1);
_ -> _ ->
@ -112,11 +112,11 @@ wait_for_tls(Event, State) ->
{next_state, wait_for_tls, State}. {next_state, wait_for_tls, State}.
session_established(Msg, State) when is_record(Msg, stun) -> session_established(Msg, State) when is_record(Msg, stun) ->
?DEBUG("got:~n~s", [stun_codec:pp(Msg)]), ?DEBUG("got:~n~p", [Msg]),
{Addr, Port} = State#state.peer, {Addr, Port} = State#state.peer,
case process(Addr, Port, Msg) of case process(Addr, Port, Msg) of
Resp when is_record(Resp, stun) -> Resp when is_record(Resp, stun) ->
?DEBUG("sent:~n~s", [stun_codec:pp(Resp)]), ?DEBUG("sent:~n~p", [Resp]),
Data = stun_codec:encode(Resp), Data = stun_codec:encode(Resp),
(State#state.sock_mod):send(State#state.sock, Data); (State#state.sock_mod):send(State#state.sock, Data);
_ -> _ ->