diff options
author | Emile Joubert <emile@lshift.net> | 2009-01-11 22:24:33 +0000 |
---|---|---|
committer | Emile Joubert <emile@lshift.net> | 2009-01-11 22:24:33 +0000 |
commit | d809b57f7db18757ae0c8a3e3a780bfa40c3bf0c (patch) | |
tree | 1498bf8edb981c26d299405380d7e3eb7f963d34 | |
parent | c9e9c8e947b36433460aa4969cf8f51e81309302 (diff) | |
download | rabbitmq-server-d809b57f7db18757ae0c8a3e3a780bfa40c3bf0c.tar.gz |
Better dispatching while formatting results in rabbitmqctl
-rw-r--r-- | src/rabbit_control.erl | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/rabbit_control.erl b/src/rabbit_control.erl index 419d71d9..1e07f6d2 100644 --- a/src/rabbit_control.erl +++ b/src/rabbit_control.erl @@ -310,10 +310,9 @@ format_info_item(Items, Key) -> case Info of {_, #resource{name = Name}} -> url_encode(Name); - {Key, IpAddress} when Key =:= address; Key =:= peer_address - andalso is_tuple(IpAddress) -> - inet_parse:ntoa(IpAddress); - {pid, _} -> + _ 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) -> url_encode(Value); |