Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

note IPv4 or IPv6 as appropriate in munin statistics (Olivier Girondel)

  • Loading branch information...
commit 32ad09abb2319973b24fc1a9c93bf169ecb929cc 1 parent 43bd8ab
@vinoski vinoski authored
Showing with 8 additions and 2 deletions.
  1. +8 −2 src/yaws_ctl.erl
View
10 src/yaws_ctl.erl
@@ -265,6 +265,11 @@ a_debug_dump(Sock) ->
yaws_debug:do_debug_dump(Sock).
+vsn(IP) when size(IP) =:= 4 ->
+ "(ipv4)";
+vsn(IP) when size(IP) =:= 8 ->
+ "(ipv6)".
+
-define(IPV4_FMT, "~p.~p.~p.~p").
-define(IPV6_FMT, "~2.16.0b~2.16.0b:~2.16.0b~2.16.0b:~2.16.0b~2.16.0b:~2.16.0b~2.16.0b").
@@ -318,8 +323,9 @@ a_stats() ->
%% we don't use inet_parse:ntoa/1
%% since it's not documented
IP = format_ip(IP0),
- f("~s ~s ~p ~p ~p~n",
- [Host, IP, Port, Hits, Sent])
+ IPVsn = vsn(IP0),
+ f("~s~s ~s ~p ~p ~p~n",
+ [Host, IPVsn, IP, Port, Hits, Sent])
end, Stats),
[Header, Lines]
end.
Please sign in to comment.
Something went wrong with that request. Please try again.