diff options
| author | Vlad Ionescu <vlad@lshift.net> | 2009-09-14 16:10:21 +0100 |
|---|---|---|
| committer | Vlad Ionescu <vlad@lshift.net> | 2009-09-14 16:10:21 +0100 |
| commit | d2cd0afd5ec41f8696d44dd52bf6f0b59d4e46da (patch) | |
| tree | 3ee4cdffed18387bc92857e29de47e25f7458fe1 | |
| parent | 93742a0b3633f26811f9827de5c0eb9b15dd9c03 (diff) | |
| download | rabbitmq-server-git-d2cd0afd5ec41f8696d44dd52bf6f0b59d4e46da.tar.gz | |
using '' instead of '$none' for undefined username, printing nothing for undefined username; adding state to the default list for list_connections in rabbit_control
| -rw-r--r-- | src/rabbit_control.erl | 6 | ||||
| -rw-r--r-- | src/rabbit_reader.erl | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/rabbit_control.erl b/src/rabbit_control.erl index 3258a04b17..365093589c 100644 --- a/src/rabbit_control.erl +++ b/src/rabbit_control.erl @@ -271,7 +271,7 @@ 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])), + default_if_empty(Args, [user, peer_address, peer_port, state])), display_info_list(rpc_call(Node, rabbit_networking, connection_info_all, [ArgAtoms]), ArgAtoms); @@ -330,14 +330,14 @@ 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) -> atom_to_list(node(Value)); _ when is_binary(Value) -> escape(Value); + _ when is_atom(Value) -> + io_lib:format("~s", [Value]); _ -> io_lib:format("~w", [Value]) end. diff --git a/src/rabbit_reader.erl b/src/rabbit_reader.erl index 435919b62c..690e6f0e38 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}}) -> |
