diff options
author | Björn Gustavsson <[email protected]> | 2013-01-10 14:22:41 +0100 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2013-01-22 19:20:11 +0100 |
commit | eb764d6980aa7ad5ce03436c77e17e32a5dfdd81 (patch) | |
tree | 36140d4d296ca660df085a9a393a554b87f6d128 | |
parent | eefed16b34af8497c8eb28c74367a1bd44b0d9bd (diff) | |
download | otp-eb764d6980aa7ad5ce03436c77e17e32a5dfdd81.tar.gz otp-eb764d6980aa7ad5ce03436c77e17e32a5dfdd81.tar.bz2 otp-eb764d6980aa7ad5ce03436c77e17e32a5dfdd81.zip |
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.
-rw-r--r-- | lib/eldap/src/eldap.erl | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/lib/eldap/src/eldap.erl b/lib/eldap/src/eldap.erl index 5753cc4749..855a4086ad 100644 --- a/lib/eldap/src/eldap.erl +++ b/lib/eldap/src/eldap.erl @@ -694,7 +694,6 @@ do_recv(S, #eldap{use_tls=true, timeout=Timeout}, Len) -> recv_response(S, Data) -> case do_recv(S, Data, 0) of {ok, Packet} -> - check_tag(Packet), case asn1rt:decode('ELDAPv3', 'LDAPMessage', Packet) of {ok,Resp} -> {ok,Resp}; Error -> throw(Error) @@ -703,21 +702,6 @@ recv_response(S, Data) -> throw({gen_tcp_error, Reason}) end. -%%% Sanity check of received packet -check_tag(Data) -> - try - {_Tag, Data1, _Rb} = asn1rt_ber_bin:decode_tag(l2b(Data)), - try - {{_Len, _Data2}, _Rb2} = asn1rt_ber_bin:decode_length(l2b(Data1)), - ok - catch - _ -> throw({error,decoded_tag_length}) - end - catch - _ -> - throw({error, decoded_tag}) - end. - %%% Check for expected kind of reply check_reply(Data, {ok,Msg}, Op) when Msg#'LDAPMessage'.messageID == Data#eldap.id -> @@ -1110,7 +1094,3 @@ get_head(Str,Tail) -> %%% Should always succeed ! get_head([H|Tail],Tail,Rhead) -> lists:reverse([H|Rhead]); get_head([H|Rest],Tail,Rhead) -> get_head(Rest,Tail,[H|Rhead]). - -l2b(B) when is_binary(B) -> B; -l2b(L) when is_list(L) -> list_to_binary(L). - |