aboutsummaryrefslogtreecommitdiffstats
path: root/lib/common_test/src/ct_telnet.erl
diff options
context:
space:
mode:
authorPeter Andersson <[email protected]>2014-01-24 12:19:05 +0100
committerPeter Andersson <[email protected]>2014-01-27 19:38:10 +0100
commitf40f4686848bbabb9357b33d08d4b4039d9d7c63 (patch)
tree2454e84d3f3f1b9c649892a42651e5a2aa8c9a4b /lib/common_test/src/ct_telnet.erl
parentda730dc3f7a6e46c0341146a69871934d07120e0 (diff)
downloadotp-f40f4686848bbabb9357b33d08d4b4039d9d7c63.tar.gz
otp-f40f4686848bbabb9357b33d08d4b4039d9d7c63.tar.bz2
otp-f40f4686848bbabb9357b33d08d4b4039d9d7c63.zip
Implement tests for logging traffic for multiple telnet connections
Also fix remaining problems in source code
Diffstat (limited to 'lib/common_test/src/ct_telnet.erl')
-rw-r--r--lib/common_test/src/ct_telnet.erl10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/common_test/src/ct_telnet.erl b/lib/common_test/src/ct_telnet.erl
index 5fc89be0c5..f9dd62ee37 100644
--- a/lib/common_test/src/ct_telnet.erl
+++ b/lib/common_test/src/ct_telnet.erl
@@ -181,7 +181,7 @@ open(KeyOrName,ConnType,TargetMod,Extra) ->
end;
Bool -> Bool
end,
- log(undefined,open,"Opening connection ~p to ~p",
+ log(undefined,open,"Connecting to ~p(~p)",
[KeyOrName,Addr1]),
ct_gen_conn:start(KeyOrName,full_addr(Addr1,ConnType),
{TargetMod,KeepAlive,Extra},?MODULE)
@@ -200,7 +200,7 @@ open(KeyOrName,ConnType,TargetMod,Extra) ->
close(Connection) ->
case get_handle(Connection) of
{ok,Pid} ->
- log(undefined,close,"Closing connection for handle: ~w",[Pid]),
+ log(undefined,close,"Connection closed, handle: ~w",[Pid]),
case ct_gen_conn:stop(Pid) of
{error,{process_down,Pid,noproc}} ->
{error,already_closed};
@@ -600,9 +600,9 @@ reconnect(Ip,Port,N,State=#state{name=Name,
%% @hidden
terminate(TelnPid,State) ->
- log(State,close,"Closing telnet connection.\nId: ~w",[TelnPid]),
- ct_telnet_client:close(TelnPid).
-
+ Result = ct_telnet_client:close(TelnPid),
+ log(State,close,"Telnet connection for ~w closed.",[TelnPid]),
+ Result.
%%%=================================================================
%%% Internal function