summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTony Garnock-Jones <tonyg@lshift.net>2009-09-18 12:49:00 +0100
committerTony Garnock-Jones <tonyg@lshift.net>2009-09-18 12:49:00 +0100
commitbe8e03e39b128ca8b48312110deddb0c71a839ad (patch)
treea6cce5107e3875db21aae98f62981f549faecb55
parent3d53ddc7cafc8dcaa560118285d2b96d26ab9579 (diff)
parent8410f62358678c2ff6453ea852b0e5f51bcb090d (diff)
downloadrabbitmq-server-be8e03e39b128ca8b48312110deddb0c71a839ad.tar.gz
merge default into bug21596
-rw-r--r--docs/rabbitmqctl.1.pod2
-rw-r--r--src/rabbit_control.erl9
-rw-r--r--src/rabbit_reader.erl2
3 files changed, 8 insertions, 5 deletions
diff --git a/docs/rabbitmqctl.1.pod b/docs/rabbitmqctl.1.pod
index 6d4aadeb..c43ed2ea 100644
--- a/docs/rabbitmqctl.1.pod
+++ b/docs/rabbitmqctl.1.pod
@@ -287,7 +287,7 @@ separated by tab characters.
List queue information by virtual host. Each line printed describes an
connection, with the requested I<connectioninfoitem> values separated
by tab characters. If no I<connectioninfoitem>s are specified then
-I<user>, I<peer_address> and I<peer_port> are assumed.
+I<user>, I<peer_address>, I<peer_port> and I<state> are assumed.
=back
diff --git a/src/rabbit_control.erl b/src/rabbit_control.erl
index 69e21f7e..ac7e3eaa 100644
--- a/src/rabbit_control.erl
+++ b/src/rabbit_control.erl
@@ -164,7 +164,7 @@ exchange name, routing key, queue name and arguments, in that order.
<ConnectionInfoItem> must be a member of the list [node, address, port,
peer_address, peer_port, state, channels, user, vhost, timeout, frame_max,
recv_oct, recv_cnt, send_oct, send_cnt, send_pend]. The default is to display
-user, peer_address and peer_port.
+user, peer_address, peer_port and state.
"),
halt(1).
@@ -270,8 +270,9 @@ action(list_bindings, Node, Args, Inform) ->
action(list_connections, Node, Args, Inform) ->
Inform("Listing connections", []),
- ArgAtoms = list_replace(node, pid,
- default_if_empty(Args, [user, peer_address, peer_port])),
+ ArgAtoms = list_replace(node, pid,
+ default_if_empty(Args, [user, peer_address,
+ peer_port, state])),
display_info_list(rpc_call(Node, rabbit_networking, connection_info_all,
[ArgAtoms]),
ArgAtoms);
@@ -336,6 +337,8 @@ format_info_item(Key, Items) ->
atom_to_list(node(Value));
Value when is_binary(Value) ->
escape(Value);
+ Value when is_atom(Value) ->
+ io_lib:format("~s", [Value]);
Value ->
io_lib:format("~w", [Value])
end.
diff --git a/src/rabbit_reader.erl b/src/rabbit_reader.erl
index 69dbc008..690e6f0e 100644
--- a/src/rabbit_reader.erl
+++ b/src/rabbit_reader.erl
@@ -703,7 +703,7 @@ i(channels, #v1{}) ->
i(user, #v1{connection = #connection{user = #user{username = Username}}}) ->
Username;
i(user, #v1{connection = #connection{user = none}}) ->
- none;
+ '';
i(vhost, #v1{connection = #connection{vhost = VHost}}) ->
VHost;
i(timeout, #v1{connection = #connection{timeout_sec = Timeout}}) ->