tcap_map_patch.erl now also does the ASN.1 re-encode after patching
This commit is contained in:
parent
056e05be58
commit
34ff133237
|
@ -21,7 +21,10 @@
|
||||||
|
|
||||||
|
|
||||||
-module(tcap_map_patch).
|
-module(tcap_map_patch).
|
||||||
-compile(export_all).
|
-author('Harald Welte <laforge@gnumonks.org>').
|
||||||
|
%-compile(export_all).
|
||||||
|
|
||||||
|
-export([handle_tcap_msg/1]).
|
||||||
|
|
||||||
-define(PATCH_HLR_NUMBER, [1]).
|
-define(PATCH_HLR_NUMBER, [1]).
|
||||||
-define(PATCH_SGSN_NUMBER, [2]).
|
-define(PATCH_SGSN_NUMBER, [2]).
|
||||||
|
@ -274,6 +277,7 @@ handle_tcap_msg(PayloadL) ->
|
||||||
case asn1rt:decode('MAP', 'MapSpecificPDUs', PayloadL) of
|
case asn1rt:decode('MAP', 'MapSpecificPDUs', PayloadL) of
|
||||||
{ok, {Type, TcapMsgDec}} ->
|
{ok, {Type, TcapMsgDec}} ->
|
||||||
io:format("success!~n"),
|
io:format("success!~n"),
|
||||||
handle_tcap_msg_dec(Type, TcapMsgDec);
|
{Type, NewTcapMsgDec} = handle_tcap_msg_dec(Type, TcapMsgDec),
|
||||||
|
asn1rt:encode('MAP', Type, NewTcapMsgDec);
|
||||||
Error -> Error
|
Error -> Error
|
||||||
end.
|
end.
|
||||||
|
|
Reference in New Issue