summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVlad Alexandru Ionescu <vlad@rabbitmq.com>2010-09-06 11:41:30 +0100
committerVlad Alexandru Ionescu <vlad@rabbitmq.com>2010-09-06 11:41:30 +0100
commit0678a93d7cccb2ecfc76663f09570c5a645a917c (patch)
tree429911e305ebc5344911ae68573dfea7c77efc89
parent726dec5e26dca42fd0eacd1b3f421e35d7a25684 (diff)
parent33c142fa22932dc1d6cea104b2c3117cbef54083 (diff)
downloadrabbitmq-server-0678a93d7cccb2ecfc76663f09570c5a645a917c.tar.gz
merging bug23228 into default
-rw-r--r--packaging/generic-unix/Makefile1
-rw-r--r--packaging/windows/Makefile1
-rw-r--r--src/rabbit_amqqueue_process.erl9
-rw-r--r--src/rabbit_channel.erl6
-rw-r--r--src/rabbit_connection_sup.erl4
-rw-r--r--src/rabbit_exchange.erl4
-rw-r--r--src/rabbit_reader.erl8
-rw-r--r--src/rabbit_writer.erl4
8 files changed, 13 insertions, 24 deletions
diff --git a/packaging/generic-unix/Makefile b/packaging/generic-unix/Makefile
index 4eade6c7..c4e01f4a 100644
--- a/packaging/generic-unix/Makefile
+++ b/packaging/generic-unix/Makefile
@@ -4,7 +4,6 @@ TARGET_DIR=rabbitmq_server-$(VERSION)
TARGET_TARBALL=rabbitmq-server-generic-unix-$(VERSION)
dist:
- $(MAKE) -C ../.. VERSION=$(VERSION) srcdist
tar -zxvf ../../dist/$(SOURCE_DIR).tar.gz
$(MAKE) -C $(SOURCE_DIR) \
diff --git a/packaging/windows/Makefile b/packaging/windows/Makefile
index f47b5340..abe174e0 100644
--- a/packaging/windows/Makefile
+++ b/packaging/windows/Makefile
@@ -4,7 +4,6 @@ TARGET_DIR=rabbitmq_server-$(VERSION)
TARGET_ZIP=rabbitmq-server-windows-$(VERSION)
dist:
- $(MAKE) -C ../.. VERSION=$(VERSION) srcdist
tar -zxvf ../../dist/$(SOURCE_DIR).tar.gz
$(MAKE) -C $(SOURCE_DIR)
diff --git a/src/rabbit_amqqueue_process.erl b/src/rabbit_amqqueue_process.erl
index 90a0503b..08495862 100644
--- a/src/rabbit_amqqueue_process.erl
+++ b/src/rabbit_amqqueue_process.erl
@@ -163,10 +163,8 @@ declare(Recover, From,
self(), {rabbit_amqqueue,
set_ram_duration_target, [self()]}),
BQS = BQ:init(QName, IsDurable, Recover),
- rabbit_event:notify(
- queue_created,
- [{Item, i(Item, State)} ||
- Item <- ?CREATION_EVENT_KEYS]),
+ rabbit_event:notify(queue_created,
+ infos(?CREATION_EVENT_KEYS, State)),
noreply(init_expires(State#q{backing_queue_state = BQS}));
Q1 -> {stop, normal, {existing, Q1}, State}
end.
@@ -587,8 +585,7 @@ i(Item, _) ->
throw({bad_argument, Item}).
emit_stats(State) ->
- rabbit_event:notify(queue_stats,
- [{Item, i(Item, State)} || Item <- ?STATISTICS_KEYS]).
+ rabbit_event:notify(queue_stats, infos(?STATISTICS_KEYS, State)).
%---------------------------------------------------------------------------
diff --git a/src/rabbit_channel.erl b/src/rabbit_channel.erl
index 8e5735c5..60b807fa 100644
--- a/src/rabbit_channel.erl
+++ b/src/rabbit_channel.erl
@@ -175,9 +175,7 @@ init([Channel, ReaderPid, WriterPid, Username, VHost, CollectorPid,
blocking = dict:new(),
queue_collector_pid = CollectorPid,
stats_timer = rabbit_event:init_stats_timer()},
- rabbit_event:notify(
- channel_created,
- [{Item, i(Item, State)} || Item <- ?CREATION_EVENT_KEYS]),
+ rabbit_event:notify(channel_created, infos(?CREATION_EVENT_KEYS, State)),
{ok, State, hibernate,
{backoff, ?HIBERNATE_AFTER_MIN, ?HIBERNATE_AFTER_MIN, ?DESIRED_HIBERNATE}}.
@@ -1148,7 +1146,7 @@ update_measures(Type, QX, Inc, Measure) ->
orddict:store(Measure, Cur + Inc, Measures)).
internal_emit_stats(State = #ch{stats_timer = StatsTimer}) ->
- CoarseStats = [{Item, i(Item, State)} || Item <- ?STATISTICS_KEYS],
+ CoarseStats = infos(?STATISTICS_KEYS, State),
case rabbit_event:stats_level(StatsTimer) of
coarse ->
rabbit_event:notify(channel_stats, CoarseStats);
diff --git a/src/rabbit_connection_sup.erl b/src/rabbit_connection_sup.erl
index 69e21d73..b3821d3b 100644
--- a/src/rabbit_connection_sup.erl
+++ b/src/rabbit_connection_sup.erl
@@ -88,12 +88,12 @@ start_heartbeat_fun(SupPid) ->
SupPid, {heartbeat_sender,
{rabbit_heartbeat, start_heartbeat_sender,
[Parent, Sock, TimeoutSec]},
- intrinsic, ?MAX_WAIT, worker, [rabbit_heartbeat]}),
+ transient, ?MAX_WAIT, worker, [rabbit_heartbeat]}),
{ok, Receiver} =
supervisor2:start_child(
SupPid, {heartbeat_receiver,
{rabbit_heartbeat, start_heartbeat_receiver,
[Parent, Sock, TimeoutSec]},
- intrinsic, ?MAX_WAIT, worker, [rabbit_heartbeat]}),
+ transient, ?MAX_WAIT, worker, [rabbit_heartbeat]}),
{Sender, Receiver}
end.
diff --git a/src/rabbit_exchange.erl b/src/rabbit_exchange.erl
index 68290aa1..40bee25f 100644
--- a/src/rabbit_exchange.erl
+++ b/src/rabbit_exchange.erl
@@ -141,9 +141,7 @@ declare(ExchangeName, Type, Durable, AutoDelete, Args) ->
end
end) of
{new, X} -> TypeModule:create(X),
- rabbit_event:notify(
- exchange_created,
- [{Item, i(Item, Exchange)} || Item <- ?INFO_KEYS]),
+ rabbit_event:notify(exchange_created, info(X)),
X;
{existing, X} -> X;
Err -> Err
diff --git a/src/rabbit_reader.erl b/src/rabbit_reader.erl
index 09ada1c0..a21961b5 100644
--- a/src/rabbit_reader.erl
+++ b/src/rabbit_reader.erl
@@ -773,9 +773,8 @@ handle_method0(#'connection.open'{virtual_host = VHostPath},
rabbit_alarm:register(self(), {?MODULE, conserve_memory, []}),
State#v1{connection_state = running,
connection = NewConnection}),
- rabbit_event:notify(
- connection_created,
- [{Item, i(Item, State1)} || Item <- ?CREATION_EVENT_KEYS]),
+ rabbit_event:notify(connection_created,
+ infos(?CREATION_EVENT_KEYS, State1)),
State1;
handle_method0(#'connection.close'{}, State) when ?IS_RUNNING(State) ->
lists:foreach(fun rabbit_framing_channel:shutdown/1, all_channels()),
@@ -939,5 +938,4 @@ amqp_exception_explanation(Text, Expl) ->
end.
internal_emit_stats(State) ->
- rabbit_event:notify(connection_stats,
- [{Item, i(Item, State)} || Item <- ?STATISTICS_KEYS]).
+ rabbit_event:notify(connection_stats, infos(?STATISTICS_KEYS, State)).
diff --git a/src/rabbit_writer.erl b/src/rabbit_writer.erl
index feb214c2..aa986e54 100644
--- a/src/rabbit_writer.erl
+++ b/src/rabbit_writer.erl
@@ -171,8 +171,8 @@ call(Pid, Msg) ->
assemble_frames(Channel, MethodRecord, Protocol) ->
?LOGMESSAGE(out, Channel, MethodRecord, none),
- rabbit_binary_generator:build_simple_method_frame(Channel, MethodRecord,
- Protocol).
+ rabbit_binary_generator:build_simple_method_frame(
+ Channel, MethodRecord, Protocol).
assemble_frames(Channel, MethodRecord, Content, FrameMax, Protocol) ->
?LOGMESSAGE(out, Channel, MethodRecord, Content),