25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-24 16:23:40 +01:00

Don't use asn1rt:decode, it's not available on R20

This commit is contained in:
Paweł Chmielowski 2017-06-28 14:51:25 +02:00
parent 0f12804a49
commit 960cf495c6

View File

@ -122,7 +122,7 @@ accept(ListenSocket, Tree) ->
process(Socket, Tree) -> process(Socket, Tree) ->
case gen_tcp:recv(Socket, 0) of case gen_tcp:recv(Socket, 0) of
{ok, B} -> {ok, B} ->
case asn1rt:decode('ELDAPv3', 'LDAPMessage', B) of case 'ELDAPv3':decode('LDAPMessage', B) of
{ok, Msg} -> {ok, Msg} ->
Replies = process_msg(Msg, Tree), Replies = process_msg(Msg, Tree),
Id = Msg#'LDAPMessage'.messageID, Id = Msg#'LDAPMessage'.messageID,
@ -131,8 +131,8 @@ process(Socket, Tree) ->
Reply = #'LDAPMessage'{messageID = Id, Reply = #'LDAPMessage'{messageID = Id,
protocolOp = ReplyOp}, protocolOp = ReplyOp},
%%?DEBUG("sent:~n~p", [Reply]), %%?DEBUG("sent:~n~p", [Reply]),
{ok, Bytes} = asn1rt:encode( {ok, Bytes} = 'ELDAPv3':encode(
'ELDAPv3', 'LDAPMessage', Reply), 'LDAPMessage', Reply),
gen_tcp:send(Socket, Bytes) gen_tcp:send(Socket, Bytes)
end, Replies), end, Replies),
process(Socket, Tree); process(Socket, Tree);