aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssh/src/ssh_no_io.erl
diff options
context:
space:
mode:
authorHans Nilsson <[email protected]>2018-03-29 12:00:38 +0200
committerHans Nilsson <[email protected]>2018-03-29 12:00:38 +0200
commitf2fc2178ffad5fb890b4cc8ae0d44e3096c98103 (patch)
treec7d17aa5d23d0d9a0efe45435d1b7581f222a20d /lib/ssh/src/ssh_no_io.erl
parentc7ae37130690648f2934e033c4d8ab9551d61ac9 (diff)
parenta785db13533e1fba0f8459b3a5e5ea96ba0299c1 (diff)
downloadotp-f2fc2178ffad5fb890b4cc8ae0d44e3096c98103.tar.gz
otp-f2fc2178ffad5fb890b4cc8ae0d44e3096c98103.tar.bz2
otp-f2fc2178ffad5fb890b4cc8ae0d44e3096c98103.zip
Merge branch 'hans/ssh/dbg/OTP-14896'
* hans/ssh/dbg/OTP-14896: ssh: New test suite ssh_dbg_SUITE for testing ssh_dbg ssh: Use the new ssh_dbg module ssh: New ssh_dbg module ssh: Add ssh_connection_handler:alg/1 for test purposes ssh: Unused fields #ssh.hkey and #ssh.kex removed ssh: Simplify ssh_connection and ssh_connection_handler and their internal interfaces
Diffstat (limited to 'lib/ssh/src/ssh_no_io.erl')
-rw-r--r--lib/ssh/src/ssh_no_io.erl27
1 files changed, 8 insertions, 19 deletions
diff --git a/lib/ssh/src/ssh_no_io.erl b/lib/ssh/src/ssh_no_io.erl
index 1da257ed99..25be0023e9 100644
--- a/lib/ssh/src/ssh_no_io.erl
+++ b/lib/ssh/src/ssh_no_io.erl
@@ -31,35 +31,24 @@
-spec yes_no(any(), any()) -> no_return().
yes_no(_, _) ->
- ssh_connection_handler:disconnect(
- #ssh_msg_disconnect{code = ?SSH_DISCONNECT_SERVICE_NOT_AVAILABLE,
- description = "User interaction is not allowed"},
- {no_io_allowed, yes_no}).
+ ?DISCONNECT(?SSH_DISCONNECT_SERVICE_NOT_AVAILABLE,
+ "User interaction is not allowed").
-spec read_password(any(), any()) -> no_return().
read_password(_, _) ->
- ssh_connection_handler:disconnect(
- #ssh_msg_disconnect{code = ?SSH_DISCONNECT_SERVICE_NOT_AVAILABLE,
- description = "User interaction is not allowed"},
- {no_io_allowed, read_password}).
-
+ ?DISCONNECT(?SSH_DISCONNECT_SERVICE_NOT_AVAILABLE,
+ "User interaction is not allowed").
-spec read_line(any(), any()) -> no_return().
read_line(_, _) ->
- ssh_connection_handler:disconnect(
- #ssh_msg_disconnect{code = ?SSH_DISCONNECT_SERVICE_NOT_AVAILABLE,
- description = "User interaction is not allowed"},
- {no_io_allowed, read_line}).
-
+ ?DISCONNECT(?SSH_DISCONNECT_SERVICE_NOT_AVAILABLE,
+ "User interaction is not allowed").
-spec format(any(), any()) -> no_return().
format(_, _) ->
- ssh_connection_handler:disconnect(
- #ssh_msg_disconnect{code = ?SSH_DISCONNECT_SERVICE_NOT_AVAILABLE,
- description = "User interaction is not allowed"},
- {no_io_allowed, format}).
-
+ ?DISCONNECT(?SSH_DISCONNECT_SERVICE_NOT_AVAILABLE,
+ "User interaction is not allowed").