From 464f2bac3b5dadd35add52fdee2ccfe8e05facd9 Mon Sep 17 00:00:00 2001 From: Dan Gudmundsson Date: Thu, 11 Feb 2010 14:46:00 +0100 Subject: Fixed ssl:setopts(Socket, binary) which was didn't work for 'new' ssl. --- lib/ssl/src/ssl.erl | 6 ++++-- lib/ssl/src/ssl_connection.erl | 3 +-- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'lib') 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) -> diff --git a/lib/ssl/src/ssl_connection.erl b/lib/ssl/src/ssl_connection.erl index 4c8421912b..bbffa1e564 100644 --- a/lib/ssl/src/ssl_connection.erl +++ b/lib/ssl/src/ssl_connection.erl @@ -1061,8 +1061,7 @@ send_all_state_event(FsmPid, Event) -> gen_fsm:send_all_state_event(FsmPid, Event). sync_send_all_state_event(FsmPid, Event) -> - sync_send_all_state_event(FsmPid, Event, ?DEFAULT_TIMEOUT -). + sync_send_all_state_event(FsmPid, Event, ?DEFAULT_TIMEOUT). sync_send_all_state_event(FsmPid, Event, Timeout) -> try gen_fsm:sync_send_all_state_event(FsmPid, Event, Timeout) -- cgit v1.2.3