erlang
/
osmo-map-masq
Archived
4
0
Fork 0

tcap_map_patch.erl now also does the ASN.1 re-encode after patching

This commit is contained in:
Harald Welte 2010-08-07 13:29:22 +02:00
parent 056e05be58
commit 34ff133237
1 changed files with 6 additions and 2 deletions

View File

@ -21,7 +21,10 @@
-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_SGSN_NUMBER, [2]).
@ -274,6 +277,7 @@ handle_tcap_msg(PayloadL) ->
case asn1rt:decode('MAP', 'MapSpecificPDUs', PayloadL) of
{ok, {Type, TcapMsgDec}} ->
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
end.