diff options
author | Björn Gustavsson <[email protected]> | 2010-03-09 12:00:00 +0100 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2010-08-20 08:46:31 +0200 |
commit | cc7d994b9c8db2a8889049e738f43e4f6fbf1d99 (patch) | |
tree | edb152677a71fc38309611a2ad08286722a620ea | |
parent | 075a7ffcabb8c8a4c5ce06c11155403f1967a670 (diff) | |
download | otp-cc7d994b9c8db2a8889049e738f43e4f6fbf1d99.tar.gz otp-cc7d994b9c8db2a8889049e738f43e4f6fbf1d99.tar.bz2 otp-cc7d994b9c8db2a8889049e738f43e4f6fbf1d99.zip |
sasl: Patch 1109
OTP-8506 <p>Use an infinity timeout in all calls to
<c>gen_server:call()</c> in the <c>sasl</c> application.</p>
-rw-r--r-- | lib/sasl/doc/src/notes.xml | 16 | ||||
-rw-r--r-- | lib/sasl/src/overload.erl | 22 | ||||
-rw-r--r-- | lib/sasl/src/rb.erl | 29 | ||||
-rw-r--r-- | lib/sasl/src/release_handler.erl | 47 | ||||
-rw-r--r-- | lib/sasl/src/si_sasl_supp.erl | 24 | ||||
-rw-r--r-- | lib/sasl/vsn.mk | 2 |
6 files changed, 86 insertions, 54 deletions
diff --git a/lib/sasl/doc/src/notes.xml b/lib/sasl/doc/src/notes.xml index 390b353386..4c4b11d3c4 100644 --- a/lib/sasl/doc/src/notes.xml +++ b/lib/sasl/doc/src/notes.xml @@ -30,6 +30,22 @@ </header> <p>This document describes the changes made to the SASL application.</p> +<section><title>SASL 2.1.9.1</title> + + <section><title>Improvements and New Features</title> + <list> + <item> + <p>Use an infinity timeout in all calls to + <c>gen_server:call()</c> in the <c>sasl</c> + application.</p> + <p> + Own Id: OTP-8506 Aux Id: seq11509 </p> + </item> + </list> + </section> + +</section> + <section><title>SASL 2.1.9</title> <section><title>Improvements and New Features</title> diff --git a/lib/sasl/src/overload.erl b/lib/sasl/src/overload.erl index 3a9a51e8bf..5a4782efff 100644 --- a/lib/sasl/src/overload.erl +++ b/lib/sasl/src/overload.erl @@ -1,19 +1,19 @@ %% %% %CopyrightBegin% -%% -%% Copyright Ericsson AB 1996-2009. All Rights Reserved. -%% +%% +%% Copyright Ericsson AB 1996-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% %% -module(overload). @@ -71,7 +71,7 @@ init([]) -> %% establish a call. %% Returns: accept | reject %%----------------------------------------------------------------- -request() -> gen_server:call(overload, request). +request() -> call(request). %%----------------------------------------------------------------- %% Func: set_config_data/2 @@ -82,13 +82,19 @@ request() -> gen_server:call(overload, request). %% documented at all. %%----------------------------------------------------------------- set_config_data(MaxIntensity, Weight) -> - gen_server:call(overload, {set_config_data, MaxIntensity, Weight}). + call({set_config_data, MaxIntensity, Weight}). %%----------------------------------------------------------------- %% Func: get_overload_info/0 %% Returns: A list of tagged items: TotalIntensity, AcceptIntensity, %% MaxIntensity, Weight, TotalRequests, AcceptedRequests. %%----------------------------------------------------------------- -get_overload_info() -> gen_server:call(overload, get_overload_info). +get_overload_info() -> call(get_overload_info). + +%%----------------------------------------------------------------- +%% call(Request) -> Term +%%----------------------------------------------------------------- +call(Req) -> + gen_server:call(overload, Req, infinity). %%%----------------------------------------------------------------- %%% Callback functions from gen_server diff --git a/lib/sasl/src/rb.erl b/lib/sasl/src/rb.erl index 332a99c6f9..38e486b7a7 100644 --- a/lib/sasl/src/rb.erl +++ b/lib/sasl/src/rb.erl @@ -53,35 +53,35 @@ start_link(Options) -> gen_server:start_link({local, rb_server}, rb, Options, []). stop() -> - gen_server:call(rb_server, stop), + call(stop), supervisor:delete_child(sasl_sup, rb_server). rescan() -> rescan([]). rescan(Options) -> - gen_server:call(rb_server, {rescan, Options}, infinity). + call({rescan, Options}). list() -> list(all). -list(Type) -> gen_server:call(rb_server, {list, Type}, infinity). +list(Type) -> call({list, Type}). show() -> - gen_server:call(rb_server, show, infinity). + call(show). show(Number) when is_integer(Number) -> - gen_server:call(rb_server, {show_number, Number}, infinity); + call({show_number, Number}); show(Type) when is_atom(Type) -> - gen_server:call(rb_server, {show_type, Type}, infinity). + call({show_type, Type}). -grep(RegExp) -> gen_server:call(rb_server, {grep, RegExp}, infinity). +grep(RegExp) -> call({grep, RegExp}). filter(Filters) when is_list(Filters) -> - gen_server:call(rb_server, {filter, Filters}, infinity). + call({filter, Filters}). filter(Filters, FDates) when is_list(Filters) andalso is_tuple(FDates) -> - gen_server:call(rb_server, {filter, {Filters, FDates}}, infinity). + call({filter, {Filters, FDates}}). -start_log(FileName) -> gen_server:call(rb_server, {start_log, FileName}). +start_log(FileName) -> call({start_log, FileName}). -stop_log() -> gen_server:call(rb_server, stop_log). +stop_log() -> call(stop_log). h() -> help(). help() -> @@ -122,6 +122,13 @@ help() -> %%----------------------------------------------------------------- %% Internal functions. %%----------------------------------------------------------------- + +%%----------------------------------------------------------------- +%% call(Request) -> Term +%%----------------------------------------------------------------- +call(Req) -> + gen_server:call(rb_server, Req, infinity). + %%----------------------------------------------------------------- %% MAKE SURE THESE TWO FUNCTIONS ARE UPDATED! %%----------------------------------------------------------------- diff --git a/lib/sasl/src/release_handler.erl b/lib/sasl/src/release_handler.erl index 42c3d9dd4b..4c43277848 100644 --- a/lib/sasl/src/release_handler.erl +++ b/lib/sasl/src/release_handler.erl @@ -1,19 +1,19 @@ %% %% %CopyrightBegin% -%% -%% Copyright Ericsson AB 1996-2009. All Rights Reserved. -%% +%% +%% Copyright Ericsson AB 1996-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% %% -module(release_handler). @@ -144,7 +144,7 @@ start_link() -> %% exit_reason() %%----------------------------------------------------------------- unpack_release(ReleaseName) -> - gen_server:call(release_handler, {unpack_release, ReleaseName}, infinity). + call({unpack_release, ReleaseName}). %%----------------------------------------------------------------- %% Purpose: Checks the relup script for the specified version. @@ -157,7 +157,7 @@ unpack_release(ReleaseName) -> %% exit_reason() %%----------------------------------------------------------------- check_install_release(Vsn) -> - gen_server:call(release_handler, {check_install_release, Vsn}, infinity). + call({check_install_release, Vsn}). %%----------------------------------------------------------------- @@ -172,16 +172,13 @@ check_install_release(Vsn) -> %% exit_reason() %%----------------------------------------------------------------- install_release(Vsn) -> - gen_server:call(release_handler, - {install_release, Vsn, restart, []}, - infinity). + call({install_release, Vsn, restart, []}). + install_release(Vsn, Opt) -> case check_install_options(Opt, restart, []) of {ok, ErrorAction, InstallOpt} -> - gen_server:call(release_handler, - {install_release, Vsn, ErrorAction, InstallOpt}, - infinity); + call({install_release, Vsn, ErrorAction, InstallOpt}); Error -> Error end. @@ -222,13 +219,13 @@ check_timeout(_Else) -> false. %% exit_reason() %%----------------------------------------------------------------- make_permanent(Vsn) -> - gen_server:call(release_handler, {make_permanent, Vsn}, infinity). + call({make_permanent, Vsn}). %%----------------------------------------------------------------- %% Purpose: Reboots the system from an old release. %%----------------------------------------------------------------- reboot_old_release(Vsn) -> - gen_server:call(release_handler, {reboot_old_release, Vsn}, infinity). + call({reboot_old_release, Vsn}). %%----------------------------------------------------------------- %% Purpose: Deletes all files and directories used by the release @@ -238,7 +235,7 @@ reboot_old_release(Vsn) -> %% Reason = {permanent, Vsn} | %%----------------------------------------------------------------- remove_release(Vsn) -> - gen_server:call(release_handler, {remove_release, Vsn}, infinity). + call({remove_release, Vsn}). %%----------------------------------------------------------------- %% Args: RelFile = string() @@ -257,7 +254,7 @@ remove_release(Vsn) -> %% Returns: ok | {error, Reason} %%----------------------------------------------------------------- set_unpacked(RelFile, LibDirs) -> - gen_server:call(release_handler, {set_unpacked, RelFile, LibDirs}). + call({set_unpacked, RelFile, LibDirs}). %%----------------------------------------------------------------- %% Args: Vsn = string() @@ -267,7 +264,7 @@ set_unpacked(RelFile, LibDirs) -> %% Returns: ok | {error, Reason} %%----------------------------------------------------------------- set_removed(Vsn) -> - gen_server:call(release_handler, {set_removed, Vsn}). + call({set_removed, Vsn}). %%----------------------------------------------------------------- %% Purpose: Makes it possible to install the start.boot, @@ -278,14 +275,14 @@ set_removed(Vsn) -> %% Returns: ok | {error, {no_such_release, Vsn}} %%----------------------------------------------------------------- install_file(Vsn, File) when is_list(File) -> - gen_server:call(release_handler, {install_file, File, Vsn}). + call({install_file, File, Vsn}). %%----------------------------------------------------------------- %% Returns: [{Name, Vsn, [LibName], Status}] %% Status = unpacked | current | permanent | old %%----------------------------------------------------------------- which_releases() -> - gen_server:call(release_handler, which_releases). + call(which_releases). %%----------------------------------------------------------------- %% check_script(Script, LibDirs) -> ok | {error, Reason} @@ -468,11 +465,11 @@ read_appspec(App, Dir) -> throw(Reason) end. - - - - - +%%----------------------------------------------------------------- +%% call(Request) -> Term +%%----------------------------------------------------------------- +call(Req) -> + gen_server:call(release_handler, Req, infinity). %%----------------------------------------------------------------- diff --git a/lib/sasl/src/si_sasl_supp.erl b/lib/sasl/src/si_sasl_supp.erl index 52dbed2e00..9c96d11c28 100644 --- a/lib/sasl/src/si_sasl_supp.erl +++ b/lib/sasl/src/si_sasl_supp.erl @@ -1,19 +1,19 @@ %% %% %CopyrightBegin% -%% -%% Copyright Ericsson AB 1996-2009. All Rights Reserved. -%% +%% +%% Copyright Ericsson AB 1996-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% %% -module(si_sasl_supp). @@ -57,13 +57,13 @@ h() -> print_help(). help() -> print_help(). -si_exec(Fun, Args) -> gen_server:call(si_server, {si_exec, Fun, Args}). +si_exec(Fun, Args) -> call({si_exec, Fun, Args}). start_log(FileName) -> - gen_server:call(si_server, {start_log, FileName}). + call({start_log, FileName}). stop_log() -> - gen_server:call(si_server, stop_log). + call(stop_log). abbrevs() -> io:format("~p", [process_abbrevs()]). @@ -123,7 +123,7 @@ start_link(_Options) -> gen_server:start_link({local, si_server}, si_sasl_supp, [], []). stop() -> - gen_server:call(si_server, stop), + call(stop), supervisor:delete_child(sasl_sup, si_server). @@ -208,6 +208,12 @@ open_log_file(FileName) -> %% 3. Code %%-------------------------------------------------- +%%----------------------------------------------------------------- +%% call(Request) -> Term +%%----------------------------------------------------------------- +call(Req) -> + gen_server:call(si_server, Req, infinity). + %%-------------------------------------------------- %% Makes a Pid of almost anything. %% Returns: Pid|{error, Reason} diff --git a/lib/sasl/vsn.mk b/lib/sasl/vsn.mk index c73301687a..cad33a5d9c 100644 --- a/lib/sasl/vsn.mk +++ b/lib/sasl/vsn.mk @@ -1 +1 @@ -SASL_VSN = 2.1.9 +SASL_VSN = 2.1.9.1 |