aboutsummaryrefslogtreecommitdiffstats
path: root/lib/common_test/src/unix_telnet.erl
diff options
context:
space:
mode:
authorSiri Hansen <[email protected]>2013-05-21 17:54:36 +0200
committerSiri Hansen <[email protected]>2013-05-21 17:54:36 +0200
commitadec35a4179383184e85c77dedd38338fa024961 (patch)
treeb88ce47336114b613eea8a925336f71002f09bd8 /lib/common_test/src/unix_telnet.erl
parent6f0eff8696a7646efb42e1d562d02ed5a4ef5098 (diff)
parent2886d9937990c3465671b59d744f6bacd43545c8 (diff)
downloadotp-adec35a4179383184e85c77dedd38338fa024961.tar.gz
otp-adec35a4179383184e85c77dedd38338fa024961.tar.bz2
otp-adec35a4179383184e85c77dedd38338fa024961.zip
Merge branch 'maint'
Diffstat (limited to 'lib/common_test/src/unix_telnet.erl')
-rw-r--r--lib/common_test/src/unix_telnet.erl36
1 files changed, 5 insertions, 31 deletions
diff --git a/lib/common_test/src/unix_telnet.erl b/lib/common_test/src/unix_telnet.erl
index 71df2ab44e..88199b07d0 100644
--- a/lib/common_test/src/unix_telnet.erl
+++ b/lib/common_test/src/unix_telnet.erl
@@ -94,16 +94,11 @@ connect(Ip,Port,Timeout,KeepAlive,Extra) ->
{Username,Password} ->
connect1(Ip,Port,Timeout,KeepAlive,Username,Password);
Name ->
- case not_require_user_and_pass(Name) of
- true ->
- connect_without_username_and_pass(Ip,Port,Timeout,KeepAlive);
- _ ->
- case get_username_and_password(Name) of
- {ok,{Username,Password}} ->
- connect1(Ip,Port,Timeout,KeepAlive,Username,Password);
- Error ->
- Error
- end
+ case get_username_and_password(Name) of
+ {ok,{Username,Password}} ->
+ connect1(Ip,Port,Timeout,KeepAlive,Username,Password);
+ Error ->
+ Error
end
end.
@@ -149,27 +144,6 @@ connect1(Ip,Port,Timeout,KeepAlive,Username,Password) ->
end_log(),
Result.
-connect_without_username_and_pass(Ip,Port,Timeout,KeepAlive) ->
- start_log("unix_telnet:connect"),
- Result =
- case ct_telnet_client:open(Ip,Port,Timeout,KeepAlive) of
- {ok,Pid} ->
- {ok, Pid};
- Error ->
- cont_log("Could not open telnet connection\n~p\n",[Error]),
- Error
- end,
- end_log(),
- Result.
-
-not_require_user_and_pass(Name) ->
- case ct:get_config({Name, not_require_user_and_pass}) of
- undefined ->
- false;
- _ ->
- true
- end.
-
get_username_and_password(Name) ->
case ct:get_config({Name,username}) of
undefined ->