aboutsummaryrefslogtreecommitdiffstats
path: root/lib/sasl/src/rb.erl
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2010-03-09 12:00:00 +0100
committerBjörn Gustavsson <[email protected]>2010-08-20 08:46:31 +0200
commitcc7d994b9c8db2a8889049e738f43e4f6fbf1d99 (patch)
treeedb152677a71fc38309611a2ad08286722a620ea /lib/sasl/src/rb.erl
parent075a7ffcabb8c8a4c5ce06c11155403f1967a670 (diff)
downloadotp-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>
Diffstat (limited to 'lib/sasl/src/rb.erl')
-rw-r--r--lib/sasl/src/rb.erl29
1 files changed, 18 insertions, 11 deletions
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!
%%-----------------------------------------------------------------