aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2011-04-14 17:49:55 +0200
committerHarald Welte <laforge@gnumonks.org>2011-04-14 17:49:55 +0200
commitfc13de88e92124dbd3b61259c853f65e9895a5f5 (patch)
tree49cfca230a665f502d5a945b3b4ecbe43e9da647
parent3607d36bd83fa33f3c769e5fd448a9536c6e6b28 (diff)
make mgw_nat much more quiet during operation
-rw-r--r--src/mgw_nat.erl12
-rw-r--r--src/sctp_handler.erl8
2 files changed, 10 insertions, 10 deletions
diff --git a/src/mgw_nat.erl b/src/mgw_nat.erl
index 6e0a49e..03ece03 100644
--- a/src/mgw_nat.erl
+++ b/src/mgw_nat.erl
@@ -74,9 +74,9 @@ mangle_rx_mtp3(Fn, From, Path, Mtp3 = #mtp3_msg{service_ind = Service}) ->
% mangle the ISUP content
mangle_rx_mtp3_serv(Fn, From, Path, ?MTP3_SERV_ISUP, Mtp3 = #mtp3_msg{payload = Payload}) ->
- io:format("ISUP In: ~p~n", [Payload]),
+ %io:format("ISUP In: ~p~n", [Payload]),
Isup = isup_codec:parse_isup_msg(Payload),
- io:format("ISUP Decode: ~p~n", [Isup]),
+ %io:format("ISUP Decode: ~p~n", [Isup]),
%IsupMangled = mangle_rx_isup(From, Path, Isup#isup_msg.msg_type, Isup),
try Fn(isup, From, Path, Isup#isup_msg.msg_type, Isup) of
IsupMangled ->
@@ -99,9 +99,9 @@ mangle_rx_mtp3_serv(Fn, From, Path, ?MTP3_SERV_ISUP, Mtp3 = #mtp3_msg{payload =
end;
% mangle the SCCP content
mangle_rx_mtp3_serv(Fn, From, Path, ?MTP3_SERV_SCCP, Mtp3 = #mtp3_msg{payload = Payload}) ->
- io:format("SCCP In: ~p~n", [Payload]),
+ %io:format("SCCP In: ~p~n", [Payload]),
{ok, Sccp} = sccp_codec:parse_sccp_msg(Payload),
- io:format("SCCP Decode: ~p~n", [Sccp]),
+ %io:format("SCCP Decode: ~p~n", [Sccp]),
SccpMangled = Fn(sccp, From, Path ++ [Mtp3], Sccp#sccp_msg.msg_type, Sccp),
SccpMasqued = mangle_rx_sccp_map(Fn, From, Path ++ [Mtp3], SccpMangled#sccp_msg.msg_type, Sccp),
%SccpMangled = mangle_rx_sccp(From, Path ++ [Mtp3], Sccp#sccp_msg.msg_type, Sccp),
@@ -110,9 +110,9 @@ mangle_rx_mtp3_serv(Fn, From, Path, ?MTP3_SERV_SCCP, Mtp3 = #mtp3_msg{payload =
if SccpMasqued == Sccp ->
Mtp3;
true ->
- io:format("SCCP Encode In: ~p~n", [SccpMasqued]),
+ %io:format("SCCP Encode In: ~p~n", [SccpMasqued]),
Payload_out = sccp_codec:encode_sccp_msg(SccpMasqued),
- io:format("SCCP Encode Out: ~p~n", [Payload_out]),
+ %io:format("SCCP Encode Out: ~p~n", [Payload_out]),
% return modified MTP3 payload
Mtp3#mtp3_msg{payload = Payload_out}
end;
diff --git a/src/sctp_handler.erl b/src/sctp_handler.erl
index 2dce55c..e0dcba5 100644
--- a/src/sctp_handler.erl
+++ b/src/sctp_handler.erl
@@ -65,8 +65,8 @@ handle_sctp(L = #loop_data{msc_sock=MscSock, msc_remote_ip=MscRemoteIp, msc_remo
stp_sock=StpSock, stp_remote_ip=StpRemoteIp, stp_remote_port=StpRemotePort,
rewrite_act_mod=RewriteActMod},
Sctp) ->
- io:format("Entering receive loop ~p~n", [L]),
- io:format("======================================================================~n"),
+ %io:format("Entering receive loop ~p~n", [L]),
+ %io:format("======================================================================~n"),
case Sctp of
% MSC connect or disconnect
{sctp, MscSock, MscRemoteIp, Port, {ANC, SAC}}
@@ -103,13 +103,13 @@ handle_sctp(L = #loop_data{msc_sock=MscSock, msc_remote_ip=MscRemoteIp, msc_remo
NewL = L;
% MSC data
{sctp, MscSock, MscRemoteIp, MscRemotePort, {[Anc], Data}} ->
- io:format("MSC rx data: ~p ~p~n", [Anc, Data]),
+ %io:format("MSC rx data: ~p ~p~n", [Anc, Data]),
handle_rx_data(RewriteActMod, L, from_msc, Anc, Data),
inet:setopts(MscSock, [{active, once}]),
NewL = L;
% STP data
{sctp, StpSock, StpRemoteIp, StpRemotePort, {[Anc], Data}} ->
- io:format("STP rx data: ~p ~p~n", [Anc, Data]),
+ %io:format("STP rx data: ~p ~p~n", [Anc, Data]),
handle_rx_data(RewriteActMod, L, from_stp, Anc, Data),
inet:setopts(StpSock, [{active, once}]),
NewL = L;