aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssh/src/ssh_message.erl
diff options
context:
space:
mode:
authorBruce Yinhe <[email protected]>2014-10-15 10:13:27 +0200
committerBruce Yinhe <[email protected]>2014-10-15 10:13:27 +0200
commitf5b344378128831127026b3e18154fdf23d4713c (patch)
tree0efdb3e0b76d47fceffa39c9e632e02ef2818257 /lib/ssh/src/ssh_message.erl
parent56daa687a24a26ab08434c68ca172d5bd31cfdf7 (diff)
parent5d49d05c3604f764736b10cfb287818d4b41efda (diff)
downloadotp-f5b344378128831127026b3e18154fdf23d4713c.tar.gz
otp-f5b344378128831127026b3e18154fdf23d4713c.tar.bz2
otp-f5b344378128831127026b3e18154fdf23d4713c.zip
Merge branch 'maint-17' into maint
Conflicts: OTP_VERSION
Diffstat (limited to 'lib/ssh/src/ssh_message.erl')
-rw-r--r--lib/ssh/src/ssh_message.erl13
1 files changed, 10 insertions, 3 deletions
diff --git a/lib/ssh/src/ssh_message.erl b/lib/ssh/src/ssh_message.erl
index 76b57cb995..891ccec24c 100644
--- a/lib/ssh/src/ssh_message.erl
+++ b/lib/ssh/src/ssh_message.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2013-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2013-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -162,8 +162,15 @@ encode(#ssh_msg_userauth_info_request{
encode(#ssh_msg_userauth_info_response{
num_responses = Num,
data = Data}) ->
- ssh_bits:encode([?SSH_MSG_USERAUTH_INFO_RESPONSE, Num, Data],
- [byte, uint32, '...']);
+ Responses = lists:map(fun("") ->
+ <<>>;
+ (Response) ->
+ ssh_bits:encode([Response], [string])
+ end, Data),
+ Start = ssh_bits:encode([?SSH_MSG_USERAUTH_INFO_RESPONSE, Num],
+ [byte, uint32]),
+ iolist_to_binary([Start, Responses]);
+
encode(#ssh_msg_disconnect{
code = Code,
description = Desc,