summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandru Scvortov <alexandru@rabbitmq.com>2011-08-05 14:57:38 +0100
committerAlexandru Scvortov <alexandru@rabbitmq.com>2011-08-05 14:57:38 +0100
commit2263a1a11da4144f11ed7da4140d0e77e2c449b7 (patch)
tree4bcc482c01fcce254608b283ecdda15b638b5772
parentf4b8122b17cfb7e23db4b70a5501391dd841b191 (diff)
downloadrabbitmq-server-git-2263a1a11da4144f11ed7da4140d0e77e2c449b7.tar.gz
more specs + revert earlier mistake
The specs for binary_parser, channel_sup, channel_sup_sup, client_sup, command_assembler, connection_sup, control, direct, error_logger, error_logger_file, event, exchange, exchange_type, exchange_type_direct, exchange_type_fanout, exchange_type_headers, exchange_type_topic, framing, guid are fine. The two framing modules are missing the spec for lookup_class_name/1.
-rw-r--r--src/rabbit_binding.erl4
-rw-r--r--src/rabbit_client_sup.erl3
-rw-r--r--src/rabbit_error_logger.erl10
3 files changed, 13 insertions, 4 deletions
diff --git a/src/rabbit_binding.erl b/src/rabbit_binding.erl
index 89002a70a8..205d5bbabd 100644
--- a/src/rabbit_binding.erl
+++ b/src/rabbit_binding.erl
@@ -68,9 +68,9 @@
-spec(info/1 :: (rabbit_types:binding()) -> rabbit_types:infos()).
-spec(info/2 :: (rabbit_types:binding(), rabbit_types:info_keys()) ->
rabbit_types:infos()).
--spec(info_all/1 :: (rabbit_types:vhost()) -> rabbit_types:infos()).
+-spec(info_all/1 :: (rabbit_types:vhost()) -> [rabbit_types:infos()]).
-spec(info_all/2 ::(rabbit_types:vhost(), rabbit_types:info_keys())
- -> rabbit_types:infos()).
+ -> [rabbit_types:infos()]).
-spec(has_for_source/1 :: (rabbit_types:binding_source()) -> boolean()).
-spec(remove_for_source/1 :: (rabbit_types:binding_source()) -> bindings()).
-spec(remove_for_destination/1 ::
diff --git a/src/rabbit_client_sup.erl b/src/rabbit_client_sup.erl
index 15e92542a2..dfb400e37f 100644
--- a/src/rabbit_client_sup.erl
+++ b/src/rabbit_client_sup.erl
@@ -28,8 +28,7 @@
-ifdef(use_specs).
--spec(start_link/1 :: (mfa()) ->
- rabbit_types:ok_pid_or_error()).
+-spec(start_link/1 :: (mfa()) -> rabbit_types:ok_pid_or_error()).
-spec(start_link/2 :: ({'local', atom()}, mfa()) ->
rabbit_types:ok_pid_or_error()).
diff --git a/src/rabbit_error_logger.erl b/src/rabbit_error_logger.erl
index 93aad9e354..6e29ace71a 100644
--- a/src/rabbit_error_logger.erl
+++ b/src/rabbit_error_logger.erl
@@ -27,6 +27,16 @@
-export([init/1, terminate/2, code_change/3, handle_call/2, handle_event/2,
handle_info/2]).
+%%----------------------------------------------------------------------------
+
+-ifdef(use_specs).
+
+-spec(boot/0 :: () -> 'ok').
+
+-endif.
+
+%%----------------------------------------------------------------------------
+
boot() ->
{ok, DefaultVHost} = application:get_env(default_vhost),
ok = error_logger:add_report_handler(?MODULE, [DefaultVHost]).