summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Sackman <matthew@rabbitmq.com>2010-06-23 12:15:23 +0100
committerMatthew Sackman <matthew@rabbitmq.com>2010-06-23 12:15:23 +0100
commit65da86d69a40843b06a7b639d792c09cc01eaa8b (patch)
tree0074dc099782e0b3cf1f3fb0eca35d499fcb1e65
parent1726042ba98e84d7aaa55a9f2da9793f9df72a28 (diff)
parentb87335a5de805c9feb82377a345d714ae5ed0ab3 (diff)
downloadrabbitmq-server-65da86d69a40843b06a7b639d792c09cc01eaa8b.tar.gz
Merging heads
-rw-r--r--Makefile2
-rw-r--r--docs/html-to-website-xml.xsl4
-rw-r--r--packaging/macports/Portfile.in7
-rwxr-xr-xpackaging/macports/make-port-diff.sh27
-rw-r--r--src/rabbit_amqqueue.erl2
-rw-r--r--src/rabbit_channel.erl32
-rw-r--r--src/rabbit_memory_monitor.erl3
7 files changed, 56 insertions, 21 deletions
diff --git a/Makefile b/Makefile
index 725f20a6..36b045f7 100644
--- a/Makefile
+++ b/Makefile
@@ -56,7 +56,7 @@ TARGET_SRC_DIR=dist/$(TARBALL_NAME)
SIBLING_CODEGEN_DIR=../rabbitmq-codegen/
AMQP_CODEGEN_DIR=$(shell [ -d $(SIBLING_CODEGEN_DIR) ] && echo $(SIBLING_CODEGEN_DIR) || echo codegen)
-AMQP_SPEC_JSON_FILES=$(AMQP_CODEGEN_DIR)/amqp-0.8.json
+AMQP_SPEC_JSON_FILES=$(AMQP_CODEGEN_DIR)/amqp-0.8.json $(AMQP_CODEGEN_DIR)/rabbitmq-0.8-extensions.json
ERL_CALL=erl_call -sname $(RABBITMQ_NODENAME) -e
diff --git a/docs/html-to-website-xml.xsl b/docs/html-to-website-xml.xsl
index f2117e26..662dbea0 100644
--- a/docs/html-to-website-xml.xsl
+++ b/docs/html-to-website-xml.xsl
@@ -58,13 +58,13 @@
<!-- Specific instructions to revert the DocBook HTML to be more like our ad-hoc XML schema -->
<xsl:template match="div[@class='refsect1'] | div[@class='refnamediv'] | div[@class='refsynopsisdiv']">
- <doc:section name="{@title}">
+ <doc:section name="{h2}">
<xsl:apply-templates select="node()"/>
</doc:section>
</xsl:template>
<xsl:template match="div[@class='refsect2']">
- <doc:subsection name="{@title}">
+ <doc:subsection name="{h3}">
<xsl:apply-templates select="node()"/>
</doc:subsection>
</xsl:template>
diff --git a/packaging/macports/Portfile.in b/packaging/macports/Portfile.in
index 153727be..188a81c0 100644
--- a/packaging/macports/Portfile.in
+++ b/packaging/macports/Portfile.in
@@ -4,9 +4,8 @@
PortSystem 1.0
name rabbitmq-server
version @VERSION@
-revision 1
categories net
-maintainers rabbitmq.com:tonyg
+maintainers paperplanes.de:meyer rabbitmq.com:tonyg openmaintainer
platforms darwin
description The RabbitMQ AMQP Server
long_description \
@@ -23,8 +22,8 @@ checksums \
sha1 @sha1@ \
rmd160 @rmd160@
-depends_build port:erlang port:xmlto port:libxslt
-depends_run port:erlang
+depends_lib port:erlang
+depends_build port:xmlto port:libxslt
platform darwin 7 {
depends_build-append port:py25-simplejson
diff --git a/packaging/macports/make-port-diff.sh b/packaging/macports/make-port-diff.sh
new file mode 100755
index 00000000..3eb1b9f5
--- /dev/null
+++ b/packaging/macports/make-port-diff.sh
@@ -0,0 +1,27 @@
+#!/bin/bash
+
+# This script grabs the latest rabbitmq-server bits from the main
+# macports subversion repo, and from the rabbitmq.com macports repo,
+# and produces a diff from the former to the latter for submission
+# through the macports trac.
+
+set -e
+
+dir=/tmp/$(basename $0).$$
+mkdir -p $dir/macports $dir/rabbitmq
+
+# Get the files from the macports subversion repo
+cd $dir/macports
+svn checkout http://svn.macports.org/repository/macports/trunk/dports/net/rabbitmq-server/ 2>&1 >/dev/null
+
+# Clear out the svn $id tag
+sed -i -e 's|^# \$.*$|# $Id$|' rabbitmq-server/Portfile
+
+# Get the files from the rabbitmq.com macports repo
+cd ../rabbitmq
+curl -s http://www.rabbitmq.com/releases/macports/net/rabbitmq-server.tgz | tar xzf -
+
+cd ..
+diff -Naur --exclude=.svn macports rabbitmq
+cd /
+rm -rf $dir
diff --git a/src/rabbit_amqqueue.erl b/src/rabbit_amqqueue.erl
index 12891447..9871b604 100644
--- a/src/rabbit_amqqueue.erl
+++ b/src/rabbit_amqqueue.erl
@@ -110,7 +110,7 @@
-spec(internal_delete/1 :: (queue_name()) -> 'ok' | not_found()).
-spec(maybe_run_queue_via_backing_queue/2 :: (pid(), (fun ((A) -> A))) -> 'ok').
-spec(update_ram_duration/1 :: (pid()) -> 'ok').
--spec(set_ram_duration_target/2 :: (pid(), number()) -> 'ok').
+-spec(set_ram_duration_target/2 :: (pid(), number() | 'infinity') -> 'ok').
-spec(set_maximum_since_use/2 :: (pid(), non_neg_integer()) -> 'ok').
-spec(on_node_down/1 :: (erlang_node()) -> 'ok').
-spec(pseudo_queue/2 :: (binary(), pid()) -> amqqueue()).
diff --git a/src/rabbit_channel.erl b/src/rabbit_channel.erl
index 1ab34f86..ced6c1c7 100644
--- a/src/rabbit_channel.erl
+++ b/src/rabbit_channel.erl
@@ -447,13 +447,9 @@ handle_method(#'basic.publish'{exchange = ExchangeNameBin,
routed ->
ok;
unroutable ->
- %% FIXME: 312 should be replaced by the ?NO_ROUTE
- %% definition, when we move to >=0-9
- ok = basic_return(Message, WriterPid, 312, <<"unroutable">>);
+ ok = basic_return(Message, WriterPid, no_route);
not_delivered ->
- %% FIXME: 313 should be replaced by the ?NO_CONSUMERS
- %% definition, when we move to >=0-9
- ok = basic_return(Message, WriterPid, 313, <<"not_delivered">>)
+ ok = basic_return(Message, WriterPid, no_consumers)
end,
{noreply, case TxnKey of
none -> State;
@@ -608,7 +604,7 @@ handle_method(#'basic.qos'{prefetch_count = PrefetchCount},
end,
{reply, #'basic.qos_ok'{}, State#ch{limiter_pid = LimiterPid2}};
-handle_method(#'basic.recover'{requeue = true},
+handle_method(#'basic.recover_async'{requeue = true},
_, State = #ch{ transaction_id = none,
unacked_message_q = UAMQ }) ->
ok = fold_per_queue(
@@ -620,10 +616,11 @@ handle_method(#'basic.recover'{requeue = true},
rabbit_amqqueue:requeue(
QPid, lists:reverse(MsgIds), self())
end, ok, UAMQ),
- %% No answer required, apparently!
+ %% No answer required - basic.recover is the newer, synchronous
+ %% variant of this method
{noreply, State#ch{unacked_message_q = queue:new()}};
-handle_method(#'basic.recover'{requeue = false},
+handle_method(#'basic.recover_async'{requeue = false},
_, State = #ch{ transaction_id = none,
writer_pid = WriterPid,
unacked_message_q = UAMQ }) ->
@@ -645,13 +642,22 @@ handle_method(#'basic.recover'{requeue = false},
WriterPid, false, ConsumerTag, DeliveryTag,
{QName, QPid, MsgId, true, Message})
end, ok, UAMQ),
- %% No answer required, apparently!
+ %% No answer required - basic.recover is the newer, synchronous
+ %% variant of this method
{noreply, State};
-handle_method(#'basic.recover'{}, _, _State) ->
+handle_method(#'basic.recover_async'{}, _, _State) ->
rabbit_misc:protocol_error(
not_allowed, "attempt to recover a transactional channel",[]);
+handle_method(#'basic.recover'{requeue = Requeue}, Content, State) ->
+ {noreply, State2 = #ch{writer_pid = WriterPid}} =
+ handle_method(#'basic.recover_async'{requeue = Requeue},
+ Content,
+ State),
+ ok = rabbit_writer:send_command(WriterPid, #'basic.recover_ok'{}),
+ {noreply, State2};
+
handle_method(#'exchange.declare'{exchange = ExchangeNameBin,
type = TypeNameBin,
passive = false,
@@ -946,7 +952,9 @@ binding_action(Fun, ExchangeNameBin, QueueNameBin, RoutingKey, Arguments,
basic_return(#basic_message{exchange_name = ExchangeName,
routing_key = RoutingKey,
content = Content},
- WriterPid, ReplyCode, ReplyText) ->
+ WriterPid, Reason) ->
+ {_Close, ReplyCode, ReplyText} =
+ rabbit_framing:lookup_amqp_exception(Reason),
ok = rabbit_writer:send_command(
WriterPid,
#'basic.return'{reply_code = ReplyCode,
diff --git a/src/rabbit_memory_monitor.erl b/src/rabbit_memory_monitor.erl
index 91e97ffe..e78b59f1 100644
--- a/src/rabbit_memory_monitor.erl
+++ b/src/rabbit_memory_monitor.erl
@@ -90,7 +90,8 @@
-spec(update/0 :: () -> 'ok').
-spec(register/2 :: (pid(), {atom(),atom(),[any()]}) -> 'ok').
-spec(deregister/1 :: (pid()) -> 'ok').
--spec(report_ram_duration/2 :: (pid(), float() | 'infinity') -> number()).
+-spec(report_ram_duration/2 :: (pid(), float() | 'infinity') ->
+ number() | 'infinity').
-spec(stop/0 :: () -> 'ok').
-endif.