aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssh/src/ssh_connection_handler.erl
diff options
context:
space:
mode:
authorZandra Hird <[email protected]>2015-05-18 10:52:01 +0200
committerZandra Hird <[email protected]>2015-05-18 10:52:01 +0200
commitbcc5248a76ee692ede18367a1f3d6cd9acd6cde7 (patch)
treeaef5714d1f5caa9292e5891ab9c580a2d53d7e14 /lib/ssh/src/ssh_connection_handler.erl
parent40732b962a7bf6300f82f5662a68df2f940b2026 (diff)
parent10e8677c632df5f9433eb771076d1ff71c7ed75d (diff)
downloadotp-bcc5248a76ee692ede18367a1f3d6cd9acd6cde7.tar.gz
otp-bcc5248a76ee692ede18367a1f3d6cd9acd6cde7.tar.bz2
otp-bcc5248a76ee692ede18367a1f3d6cd9acd6cde7.zip
Merge branch 'maint'
Conflicts: OTP_VERSION lib/ssh/doc/src/ssh.xml lib/ssh/vsn.mk
Diffstat (limited to 'lib/ssh/src/ssh_connection_handler.erl')
-rw-r--r--lib/ssh/src/ssh_connection_handler.erl12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/ssh/src/ssh_connection_handler.erl b/lib/ssh/src/ssh_connection_handler.erl
index 4dea284071..2c7f132916 100644
--- a/lib/ssh/src/ssh_connection_handler.erl
+++ b/lib/ssh/src/ssh_connection_handler.erl
@@ -581,12 +581,12 @@ handle_event(#ssh_msg_disconnect{description = Desc} = DisconnectMsg, _StateName
handle_event(#ssh_msg_ignore{}, StateName, State) ->
{next_state, StateName, next_packet(State)};
-handle_event(#ssh_msg_debug{always_display = true, message = DbgMsg},
- StateName, State) ->
- io:format("DEBUG: ~p\n", [DbgMsg]),
- {next_state, StateName, next_packet(State)};
-
-handle_event(#ssh_msg_debug{}, StateName, State) ->
+handle_event(#ssh_msg_debug{always_display = Display, message = DbgMsg, language=Lang},
+ StateName, #state{opts = Opts} = State) ->
+ F = proplists:get_value(ssh_msg_debug_fun, Opts,
+ fun(_ConnRef, _AlwaysDisplay, _Msg, _Language) -> ok end
+ ),
+ catch F(self(), Display, DbgMsg, Lang),
{next_state, StateName, next_packet(State)};
handle_event(#ssh_msg_unimplemented{}, StateName, State) ->