diff options
author | Matthias Radestock <matthias@rabbitmq.com> | 2012-10-29 17:11:25 +0000 |
---|---|---|
committer | Matthias Radestock <matthias@rabbitmq.com> | 2012-10-29 17:11:25 +0000 |
commit | 751332c96618d1c0ac07fc8062ed86743d3706d9 (patch) | |
tree | fbcd2eb6a35551cd7e0fd7b0b432ba16488f53d1 | |
parent | 7a668b7afe670100cdaab60eb1c5cc89ab5d46c0 (diff) | |
download | rabbitmq-server-751332c96618d1c0ac07fc8062ed86743d3706d9.tar.gz |
cosmetic
-rw-r--r-- | src/rabbit_reader.erl | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/src/rabbit_reader.erl b/src/rabbit_reader.erl index e9c18312..9f1f9c38 100644 --- a/src/rabbit_reader.erl +++ b/src/rabbit_reader.erl @@ -935,26 +935,27 @@ i(last_blocked_age, #v1{last_blocked_at = T}) -> timer:now_diff(erlang:now(), T) / 1000000; i(channels, #v1{}) -> length(all_channels()); -i(protocol, #v1{connection = #connection{protocol = none}}) -> - none; -i(protocol, #v1{connection = #connection{protocol = Protocol}}) -> - Protocol:version(); i(auth_mechanism, #v1{auth_mechanism = none}) -> none; i(auth_mechanism, #v1{auth_mechanism = Mechanism}) -> proplists:get_value(name, Mechanism:description()); -i(user, #v1{connection = #connection{user = #user{username = Username}}}) -> - Username; -i(user, #v1{connection = #connection{user = none}}) -> +i(protocol, #v1{connection = #connection{protocol = none}}) -> + none; +i(protocol, #v1{connection = #connection{protocol = Protocol}}) -> + Protocol:version(); +i(user, #v1{connection = #connection{user = none}}) -> ''; -i(vhost, #v1{connection = #connection{vhost = VHost}}) -> +i(user, #v1{connection = #connection{user = #user{ + username = Username}}}) -> + Username; +i(vhost, #v1{connection = #connection{vhost = VHost}}) -> VHost; -i(timeout, #v1{connection = #connection{timeout_sec = Timeout}}) -> +i(timeout, #v1{connection = #connection{timeout_sec = Timeout}}) -> Timeout; -i(frame_max, #v1{connection = #connection{frame_max = FrameMax}}) -> +i(frame_max, #v1{connection = #connection{frame_max = FrameMax}}) -> FrameMax; -i(client_properties, #v1{connection = #connection{ - client_properties = ClientProperties}}) -> +i(client_properties, #v1{connection = #connection{client_properties = + ClientProperties}}) -> ClientProperties; i(Item, #v1{}) -> throw({bad_argument, Item}). |