From 2704378d43035474c5f3d8a656b81c7bc28b5ff9 Mon Sep 17 00:00:00 2001 From: Badlop Date: Mon, 4 Feb 2013 10:31:54 +0100 Subject: [PATCH] Fix compatibility of LDAP support with Erlang R16A (EJAB-1612) As explained in Erlang/OTP git log: eldap: Remove calls to undocumented asn1rt* functions. We are about to remove the old asn1rt* modules, so we must remove the calls that eldap make to them. Since the calls are just a sanity check, we can just remove the calls. Just doing the decode will do roughly the same tests and generate similar exceptions. --- src/eldap/eldap.erl | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/eldap/eldap.erl b/src/eldap/eldap.erl index 265845e90..e18d2e22a 100644 --- a/src/eldap/eldap.erl +++ b/src/eldap/eldap.erl @@ -761,7 +761,6 @@ gen_req({bind, RootDN, Passwd}) -> %% {'EXIT', Reason} - Broke %%----------------------------------------------------------------------- recvd_packet(Pkt, S) -> - check_tag(Pkt), case asn1rt:decode('ELDAPv3', 'LDAPMessage', Pkt) of {ok,Msg} -> Op = Msg#'LDAPMessage'.protocolOp, @@ -874,7 +873,6 @@ get_op_rec(Id, Dict) -> %% {'EXIT', Reason} - Broken packet %%----------------------------------------------------------------------- recvd_wait_bind_response(Pkt, S) -> - check_tag(Pkt), case asn1rt:decode('ELDAPv3', 'LDAPMessage', Pkt) of {ok,Msg} -> ?DEBUG("~p", [Msg]), @@ -907,12 +905,6 @@ cancel_timer(Timer) -> end. -%%% Sanity check of received packet -check_tag(Data) -> - {_Tag, Data1, _Rb} = asn1rt_ber_bin:decode_tag(Data), - {{_Len,_Data2}, _Rb2} = asn1rt_ber_bin:decode_length(Data1), - ok. - close_and_retry(S, Timeout) -> catch (S#eldap.sockmod):close(S#eldap.fd), Queue = dict:fold(