From 34ff133237da37528244d93daf8d6a2e48a9c6d9 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Sat, 7 Aug 2010 13:29:22 +0200 Subject: tcap_map_patch.erl now also does the ASN.1 re-encode after patching --- src/tcap_map_patch.erl | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/tcap_map_patch.erl b/src/tcap_map_patch.erl index 7134bf6..16540ba 100644 --- a/src/tcap_map_patch.erl +++ b/src/tcap_map_patch.erl @@ -21,7 +21,10 @@ -module(tcap_map_patch). --compile(export_all). +-author('Harald Welte '). +%-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. -- cgit v1.2.3