aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssh/src/ssh_no_io.erl
diff options
context:
space:
mode:
authorHans Nilsson <[email protected]>2016-01-22 19:28:16 +0100
committerHans Nilsson <[email protected]>2016-04-27 13:36:52 +0200
commit9dc46e8d58c9464c8a48b74342951265c3b43dc8 (patch)
treebb6399e6022bcce123b4264b381bf161b76f8272 /lib/ssh/src/ssh_no_io.erl
parentb9e3e212009162d8223436032282efbc5c826cc7 (diff)
downloadotp-9dc46e8d58c9464c8a48b74342951265c3b43dc8.tar.gz
otp-9dc46e8d58c9464c8a48b74342951265c3b43dc8.tar.bz2
otp-9dc46e8d58c9464c8a48b74342951265c3b43dc8.zip
ssh: Gen_statem rewrite of ssh_connection_handler
Including misc fixes in surronding code as well as in test cases.
Diffstat (limited to 'lib/ssh/src/ssh_no_io.erl')
-rw-r--r--lib/ssh/src/ssh_no_io.erl32
1 files changed, 16 insertions, 16 deletions
diff --git a/lib/ssh/src/ssh_no_io.erl b/lib/ssh/src/ssh_no_io.erl
index 8144aac66e..2358560a26 100644
--- a/lib/ssh/src/ssh_no_io.erl
+++ b/lib/ssh/src/ssh_no_io.erl
@@ -28,26 +28,26 @@
-export([yes_no/2, read_password/2, read_line/2, format/2]).
yes_no(_, _) ->
- throw({{no_io_allowed, yes_no},
- #ssh_msg_disconnect{code = ?SSH_DISCONNECT_SERVICE_NOT_AVAILABLE,
- description = "User interaction is not allowed",
- language = "en"}}).
+ ssh_connection_handler:disconnect(
+ #ssh_msg_disconnect{code = ?SSH_DISCONNECT_SERVICE_NOT_AVAILABLE,
+ description = "User interaction is not allowed"},
+ {no_io_allowed, yes_no}).
read_password(_, _) ->
- throw({{no_io_allowed, read_password},
- #ssh_msg_disconnect{code = ?SSH_DISCONNECT_SERVICE_NOT_AVAILABLE,
- description = "User interaction is not allowed",
- language = "en"}}).
+ ssh_connection_handler:disconnect(
+ #ssh_msg_disconnect{code = ?SSH_DISCONNECT_SERVICE_NOT_AVAILABLE,
+ description = "User interaction is not allowed"},
+ {no_io_allowed, read_password}).
read_line(_, _) ->
- throw({{no_io_allowed, read_line},
- #ssh_msg_disconnect{code = ?SSH_DISCONNECT_SERVICE_NOT_AVAILABLE,
- description = "User interaction is not allowed",
- language = "en"}} ).
+ ssh_connection_handler:disconnect(
+ #ssh_msg_disconnect{code = ?SSH_DISCONNECT_SERVICE_NOT_AVAILABLE,
+ description = "User interaction is not allowed"},
+ {no_io_allowed, read_line}).
format(_, _) ->
- throw({{no_io_allowed, format},
- #ssh_msg_disconnect{code = ?SSH_DISCONNECT_SERVICE_NOT_AVAILABLE,
- description = "User interaction is not allowed",
- language = "en"}}).
+ ssh_connection_handler:disconnect(
+ #ssh_msg_disconnect{code = ?SSH_DISCONNECT_SERVICE_NOT_AVAILABLE,
+ description = "User interaction is not allowed"},
+ {no_io_allowed, format}).