summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorVlad Ionescu <vlad@lshift.net>2009-09-14 13:51:05 +0100
committerVlad Ionescu <vlad@lshift.net>2009-09-14 13:51:05 +0100
commit93742a0b3633f26811f9827de5c0eb9b15dd9c03 (patch)
tree7e1a7ea365e3a542fff01744ebda7d64a96e7351 /src
parentd15cc2d713ff3eaf4c52379ad40bbff7036523f0 (diff)
downloadrabbitmq-server-git-93742a0b3633f26811f9827de5c0eb9b15dd9c03.tar.gz
displaying (none) for '$none' atoms in rabbit_control; changing value for undefined usernames to '$none', not to confuse with none username
Diffstat (limited to 'src')
-rw-r--r--src/rabbit_control.erl2
-rw-r--r--src/rabbit_reader.erl2
2 files changed, 3 insertions, 1 deletions
diff --git a/src/rabbit_control.erl b/src/rabbit_control.erl
index cf20520eb0..3258a04b17 100644
--- a/src/rabbit_control.erl
+++ b/src/rabbit_control.erl
@@ -330,6 +330,8 @@ format_info_item(Items, Key) ->
case Info of
{_, #resource{name = Name}} ->
escape(Name);
+ {_, '$none'} ->
+ "(none)";
_ when Key =:= address; Key =:= peer_address andalso is_tuple(Value) ->
inet_parse:ntoa(Value);
_ when is_pid(Value) ->
diff --git a/src/rabbit_reader.erl b/src/rabbit_reader.erl
index 69dbc008b3..435919b62c 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;
+ '$none';
i(vhost, #v1{connection = #connection{vhost = VHost}}) ->
VHost;
i(timeout, #v1{connection = #connection{timeout_sec = Timeout}}) ->