aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssl/src/ssl.erl
diff options
context:
space:
mode:
authorDan Gudmundsson <[email protected]>2010-02-11 14:46:00 +0100
committerBjörn Gustavsson <[email protected]>2010-02-12 10:03:28 +0100
commit464f2bac3b5dadd35add52fdee2ccfe8e05facd9 (patch)
tree9e29df18cc1df5ad5f012c6ead29f0016a637993 /lib/ssl/src/ssl.erl
parenta39cf4a324eca0d5ae363350b79f37401c240cb5 (diff)
downloadotp-464f2bac3b5dadd35add52fdee2ccfe8e05facd9.tar.gz
otp-464f2bac3b5dadd35add52fdee2ccfe8e05facd9.tar.bz2
otp-464f2bac3b5dadd35add52fdee2ccfe8e05facd9.zip
Fixed ssl:setopts(Socket, binary) which was didn't work for 'new' ssl.
Diffstat (limited to 'lib/ssl/src/ssl.erl')
-rw-r--r--lib/ssl/src/ssl.erl6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/ssl/src/ssl.erl b/lib/ssl/src/ssl.erl
index 306e3f5419..19ae368781 100644
--- a/lib/ssl/src/ssl.erl
+++ b/lib/ssl/src/ssl.erl
@@ -367,8 +367,10 @@ getopts(#sslsocket{} = Socket, Options) ->
%%
%% Description:
%%--------------------------------------------------------------------
-setopts(#sslsocket{fd = new_ssl, pid = Pid}, Options) when is_pid(Pid) ->
- ssl_connection:set_opts(Pid, Options);
+setopts(#sslsocket{fd = new_ssl, pid = Pid}, Opts0) when is_pid(Pid) ->
+ Opts = proplists:expand([{binary, [{mode, binary}]},
+ {list, [{mode, list}]}], Opts0),
+ ssl_connection:set_opts(Pid, Opts);
setopts(#sslsocket{fd = new_ssl, pid = {ListenSocket, _}}, OptTags) ->
inet:setopts(ListenSocket, OptTags);
setopts(#sslsocket{} = Socket, Options) ->