summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2015-10-24 15:27:19 +0200
committerDimitri Sokolyuk <demon@dim13.org>2015-10-24 15:27:19 +0200
commit815ad55d3a263f91f3a75741eef128e25ddf3230 (patch)
treefb7151d64ca672cdc4e2e8144fc05bcd9f6d4b31
parent6bb8ed43f6e779b7edb7e3125dc5a125ba945289 (diff)
Minor cleanup
-rw-r--r--tda.erl7
1 files changed, 4 insertions, 3 deletions
diff --git a/tda.erl b/tda.erl
index 51606c7..3cc89e8 100644
--- a/tda.erl
+++ b/tda.erl
@@ -111,14 +111,13 @@ loop(Sock) ->
decode(Sock, Msg),
loop(Sock);
{tcp_closed, _} ->
- io:format(">>> closed", [])
+ closed
after ?TIMEOUT ->
io:format("timeout~n"),
stop(Sock)
end.
decode(Sock, Msg) ->
- io:format(">>> ~p~n", [Msg]),
case rose:decode('ROS', Msg) of
{ok, Rose} ->
rose_handler(Sock, Rose),
@@ -126,7 +125,9 @@ decode(Sock, Msg) ->
{error, _} ->
case acse:decode('ACSE-apdu', Msg) of
{ok, Acse} ->
- io:format("ACSE> ~p~n", [Acse])
+ io:format("ACSE> ~p~n", [Acse]);
+ {error, _} ->
+ io:format(">>> ~p~n", [Msg])
end
end.