diff options
author | Björn Gustavsson <[email protected]> | 2014-02-20 14:29:57 +0100 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2014-02-21 12:20:39 +0100 |
commit | e5c71b7f176393cdb3f6b9d17a5969e9bd89c88b (patch) | |
tree | 0ae4680c17b76f776fdcaf33233a264503083a54 /lib/megaco/src | |
parent | 687d9c05f94e807537ee397157b68653d1ddf231 (diff) | |
download | otp-e5c71b7f176393cdb3f6b9d17a5969e9bd89c88b.tar.gz otp-e5c71b7f176393cdb3f6b9d17a5969e9bd89c88b.tar.bz2 otp-e5c71b7f176393cdb3f6b9d17a5969e9bd89c88b.zip |
Deprecate asn1 functions
Those asn1 functions are no longer needed because they all have
better alternatives.
Diffstat (limited to 'lib/megaco/src')
-rw-r--r-- | lib/megaco/src/binary/megaco_binary_encoder_lib.erl | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/megaco/src/binary/megaco_binary_encoder_lib.erl b/lib/megaco/src/binary/megaco_binary_encoder_lib.erl index 8a4f4e7509..7d82262a59 100644 --- a/lib/megaco/src/binary/megaco_binary_encoder_lib.erl +++ b/lib/megaco/src/binary/megaco_binary_encoder_lib.erl @@ -66,7 +66,7 @@ version_of(_EC, Binary, 3, [AsnModV1, AsnModV2, AsnModV3]) version_of([], _Binary, Err) -> {error, {decode_failed, lists:reverse(Err)}}; version_of([AsnMod|AsnMods], Binary, Errs) when is_atom(AsnMod) -> - case (catch asn1rt:decode(AsnMod, 'MegacoMessage', Binary)) of + case (catch AsnMod:decode('MegacoMessage', Binary)) of {ok, M} -> V = (M#'MegacoMessage'.mess)#'Message'.version, {ok, V}; @@ -82,14 +82,14 @@ version_of([AsnMod|AsnMods], Binary, Errs) when is_atom(AsnMod) -> encode_message([native], MegaMsg, AsnMod, _TransMod, binary) when is_record(MegaMsg, 'MegacoMessage') -> - asn1rt:encode(AsnMod, 'MegacoMessage', MegaMsg); + AsnMod:encode('MegacoMessage', MegaMsg); encode_message(EC, MegaMsg, AsnMod, TransMod, binary) when is_list(EC) andalso is_record(MegaMsg, 'MegacoMessage') -> case (catch TransMod:tr_message(MegaMsg, encode, EC)) of {'EXIT', Reason} -> {error, Reason}; MegaMsg2 -> - asn1rt:encode(AsnMod, 'MegacoMessage', MegaMsg2) + AsnMod:encode('MegacoMessage', MegaMsg2) end; encode_message(EC, MegaMsg, AsnMod, TransMod, io_list) -> case encode_message(EC, MegaMsg, AsnMod, TransMod, binary) of @@ -276,7 +276,7 @@ decode_message_dynamic(_EC, _BadBin, _Mods, _Type) -> decode_message(EC, Bin, AsnMod, TransMod, _) -> - case asn1rt:decode(AsnMod, 'MegacoMessage', Bin) of + case AsnMod:decode('MegacoMessage', Bin) of {ok, MegaMsg} -> case EC of [native] -> |