From b75d6d2bb74002024261303e0d9915efcaf091c0 Mon Sep 17 00:00:00 2001 From: Sverker Eriksson Date: Fri, 17 Jan 2014 17:30:20 +0100 Subject: crypto: Remove all processes from application crypto and make it into a pure library application. The processes where a legacy from the time when crypto was implemented with a driver. --- lib/crypto/src/Makefile | 7 ++--- lib/crypto/src/crypto.app.src | 14 +++------ lib/crypto/src/crypto_app.erl | 39 ----------------------- lib/crypto/src/crypto_server.erl | 68 ---------------------------------------- lib/crypto/src/crypto_sup.erl | 39 ----------------------- 5 files changed, 7 insertions(+), 160 deletions(-) delete mode 100644 lib/crypto/src/crypto_app.erl delete mode 100644 lib/crypto/src/crypto_server.erl delete mode 100644 lib/crypto/src/crypto_sup.erl (limited to 'lib') diff --git a/lib/crypto/src/Makefile b/lib/crypto/src/Makefile index eabfd676c5..c185c159e5 100644 --- a/lib/crypto/src/Makefile +++ b/lib/crypto/src/Makefile @@ -1,7 +1,7 @@ # # %CopyrightBegin% # -# Copyright Ericsson AB 1999-2013. All Rights Reserved. +# Copyright Ericsson AB 1999-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 @@ -35,11 +35,8 @@ RELSYSDIR = $(RELEASE_PATH)/lib/crypto-$(VSN) # ---------------------------------------------------- MODULES= \ - crypto_app \ crypto \ - crypto_ec_curves \ - crypto_server \ - crypto_sup + crypto_ec_curves HRL_FILES= diff --git a/lib/crypto/src/crypto.app.src b/lib/crypto/src/crypto.app.src index 161ea7c9fe..d3084ff336 100644 --- a/lib/crypto/src/crypto.app.src +++ b/lib/crypto/src/crypto.app.src @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1999-2010. All Rights Reserved. +%% Copyright Ericsson AB 1999-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 @@ -17,16 +17,12 @@ %% %CopyrightEnd% %% {application, crypto, - [{description, "CRYPTO version 2"}, + [{description, "CRYPTO"}, {vsn, "%VSN%"}, {modules, [crypto, - crypto_ec_curves, - crypto_app, - crypto_sup, - crypto_server]}, - {registered, [crypto_sup, crypto_server]}, + crypto_ec_curves]}, + {registered, []}, {applications, [kernel, stdlib]}, - {env, []}, - {mod, {crypto_app, []}}]}. + {env, []}]}. diff --git a/lib/crypto/src/crypto_app.erl b/lib/crypto/src/crypto_app.erl deleted file mode 100644 index f1ea1406e4..0000000000 --- a/lib/crypto/src/crypto_app.erl +++ /dev/null @@ -1,39 +0,0 @@ -%% -%% %CopyrightBegin% -%% -%% Copyright Ericsson AB 1999-2009. 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 -%% compliance with the License. You should have received a copy of the -%% Erlang Public License along with this software. If not, it can be -%% retrieved online at http://www.erlang.org/. -%% -%% Software distributed under the License is distributed on an "AS IS" -%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See -%% the License for the specific language governing rights and limitations -%% under the License. -%% -%% %CopyrightEnd% -%% - -%% Purpose : Application master for CRYPTO. - --module(crypto_app). - --behaviour(application). - --export([start/2, stop/1]). - -%% start/2(Type, StartArgs) -> {ok, Pid} | {ok, Pid, State} | -%% {error, Reason} -%% -start(_Type, _StartArgs) -> - crypto_sup:start_link(). - -%% stop(State) -> void() -%% -stop(_State) -> - ok. - - diff --git a/lib/crypto/src/crypto_server.erl b/lib/crypto/src/crypto_server.erl deleted file mode 100644 index 89650a9f06..0000000000 --- a/lib/crypto/src/crypto_server.erl +++ /dev/null @@ -1,68 +0,0 @@ -%% -%% %CopyrightBegin% -%% -%% Copyright Ericsson AB 1999-2010. 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 -%% compliance with the License. You should have received a copy of the -%% Erlang Public License along with this software. If not, it can be -%% retrieved online at http://www.erlang.org/. -%% -%% Software distributed under the License is distributed on an "AS IS" -%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See -%% the License for the specific language governing rights and limitations -%% under the License. -%% -%% %CopyrightEnd% -%% - -%% Purpose: Provide cryptographic algorithms. - --module(crypto_server). - --behaviour(gen_server). - --export([start_link/0]). - -%% Internal exports, call-back functions. --export([init/1,handle_call/3,handle_cast/2,handle_info/2,code_change/3, - terminate/2]). - - -%%% -------------------------------------------------------- -%%% Interface Functions. -%%% -------------------------------------------------------- - -start_link() -> - gen_server:start_link({local, crypto_server}, crypto_server, [], []). - -init([]) -> - {ok,[]}. - - - -%%% -------------------------------------------------------- -%%% The call-back functions. -%%% -------------------------------------------------------- - -handle_call(_, _, State) -> - {noreply, State}. - -handle_cast(_, State) -> - {noreply, State}. - -handle_info(_, State) -> - {noreply, State}. - -code_change(_OldVsn, State, _Extra) -> - {ok, State}. - -terminate(_Reason, _State) -> - []. - - - - - - diff --git a/lib/crypto/src/crypto_sup.erl b/lib/crypto/src/crypto_sup.erl deleted file mode 100644 index 8ef58777ab..0000000000 --- a/lib/crypto/src/crypto_sup.erl +++ /dev/null @@ -1,39 +0,0 @@ -%% -%% %CopyrightBegin% -%% -%% Copyright Ericsson AB 1999-2009. 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 -%% compliance with the License. You should have received a copy of the -%% Erlang Public License along with this software. If not, it can be -%% retrieved online at http://www.erlang.org/. -%% -%% Software distributed under the License is distributed on an "AS IS" -%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See -%% the License for the specific language governing rights and limitations -%% under the License. -%% -%% %CopyrightEnd% -%% - -%% Purpose: Main supervisor in CRYPTO application. - --module(crypto_sup). - --behaviour(supervisor). - --export([start_link/0, init/1]). - -start_link() -> - supervisor:start_link({local, crypto_sup}, crypto_sup, []). - - -%% init([]) -%% Returns: {ok, {SupFlags, [ChildSpec]}} -%% -init([]) -> - Child = {crypto_server, {crypto_server, start_link, []}, - permanent, 2000, worker, [crypto_server]}, - {ok, {{one_for_all, 10, 3600}, [Child]}}. - -- cgit v1.2.3 From 8f8a03ba3556f2c2c70797bedf5d44b360659425 Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Fri, 17 Jan 2014 14:37:39 +0100 Subject: erts: fix bug when using passive mode and sendfile The bug incorrectly issued driver_select when un-ignoring an fd for a socket in passive mode, which caused an incorrect error tuple to be returned when the remote end closed the connection. --- lib/kernel/test/sendfile_SUITE.erl | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'lib') diff --git a/lib/kernel/test/sendfile_SUITE.erl b/lib/kernel/test/sendfile_SUITE.erl index 4cf4c6489d..24884bada5 100644 --- a/lib/kernel/test/sendfile_SUITE.erl +++ b/lib/kernel/test/sendfile_SUITE.erl @@ -33,6 +33,7 @@ all() -> ,t_sendfile_offset ,t_sendfile_sendafter ,t_sendfile_recvafter + ,t_sendfile_recvafter_remoteclose ,t_sendfile_sendduring ,t_sendfile_recvduring ,t_sendfile_closeduring @@ -228,6 +229,25 @@ t_sendfile_recvafter(Config) -> ok = sendfile_send(Send). +%% This tests specifically for a bug fixed in 17.0 +t_sendfile_recvafter_remoteclose(Config) -> + Filename = proplists:get_value(small_file, Config), + + Send = fun(Sock, SFServer) -> + {Size, _Data} = sendfile_file_info(Filename), + {ok, Size} = file:sendfile(Filename, Sock), + + %% Make sure the remote end has been closed + SFServer ! stop, + timer:sleep(100), + + %% In the bug this returned {error,ebadf} + {error,closed} = gen_tcp:recv(Sock, 1), + -1 + end, + + ok = sendfile_send({127,0,0,1},Send,0). + t_sendfile_sendduring(Config) -> Filename = proplists:get_value(big_file, Config), -- cgit v1.2.3 From 302954c0641ba679fb33a003c0a665b7b4a79a0e Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Mon, 27 Jan 2014 16:14:10 +0100 Subject: 17.0 anchor and broken links fixes --- lib/common_test/doc/src/run_test_chapter.xml | 2 +- lib/ssh/doc/src/ssh.xml | 2 +- lib/syntax_tools/src/erl_syntax.erl | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'lib') diff --git a/lib/common_test/doc/src/run_test_chapter.xml b/lib/common_test/doc/src/run_test_chapter.xml index 44fe73d24f..a4a77ee400 100644 --- a/lib/common_test/doc/src/run_test_chapter.xml +++ b/lib/common_test/doc/src/run_test_chapter.xml @@ -215,7 +215,7 @@
-exit_status ignore_config

For more information about the ct_run program, see the - Reference Manual and the + Reference Manual and the Installation chapter.

diff --git a/lib/ssh/doc/src/ssh.xml b/lib/ssh/doc/src/ssh.xml index 89d8be850e..5d5f2e5b91 100644 --- a/lib/ssh/doc/src/ssh.xml +++ b/lib/ssh/doc/src/ssh.xml @@ -38,7 +38,7 @@ Supported SSH version is 2.0 Supported MAC algorithms: hmac-sha1 Supported encryption algorithms: aes128-cb and 3des-cbc - Supports unicode filenames if the emulator and the underlaying OS supports it. See the DESCRIPTION section in file for information about this subject + Supports unicode filenames if the emulator and the underlaying OS supports it. See the DESCRIPTION section in file for information about this subject Supports unicode in shell and cli diff --git a/lib/syntax_tools/src/erl_syntax.erl b/lib/syntax_tools/src/erl_syntax.erl index 82be9aa489..4f7f9e83ac 100644 --- a/lib/syntax_tools/src/erl_syntax.erl +++ b/lib/syntax_tools/src/erl_syntax.erl @@ -512,7 +512,7 @@ %% @see macro/2 %% @see match_expr/2 %% @see module_qualifier/2 -%% @see named_fun_expr/1 +%% @see named_fun_expr/2 %% @see nil/0 %% @see operator/1 %% @see parentheses/1 @@ -5699,7 +5699,7 @@ named_fun_expr_name(Node) -> %% ===================================================================== %% @doc Returns the list of clause subtrees of a `named_fun_expr' node. %% -%% @see named_fun_expr/1 +%% @see named_fun_expr/2 -spec named_fun_expr_clauses(syntaxTree()) -> [syntaxTree()]. @@ -5722,7 +5722,7 @@ named_fun_expr_clauses(Node) -> %% syntax tree `C' of type `clause' such that %% `clause_patterns(C)' is a nonempty list. %% -%% @see named_fun_expr/1 +%% @see named_fun_expr/2 %% @see named_fun_expr_clauses/1 %% @see clause/3 %% @see clause_patterns/1 -- cgit v1.2.3