diff options
| author | 2026-03-15 12:52:55 +0000 | |
|---|---|---|
| committer | 2026-03-15 17:14:40 +0000 | |
| commit | 4c8dd6a6758019b253bf584f62864870de8de999 (patch) | |
| tree | d7f0c6b562c3b589ce0f3c3d8c6765bd0b7aaebe /modules/httpd_stats.cpp | |
| parent | Silence a warning in the string hashing code (for real this time). (diff) | |
Change ServerList to return a list of Server* not a duplicate class.
Diffstat (limited to 'modules/httpd_stats.cpp')
| -rw-r--r-- | modules/httpd_stats.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/modules/httpd_stats.cpp b/modules/httpd_stats.cpp index 1e5d50f9e..b45f953d8 100644 --- a/modules/httpd_stats.cpp +++ b/modules/httpd_stats.cpp @@ -308,15 +308,15 @@ namespace Stats ServerInstance->PI->GetServerList(sl); serializer.BeginBlock("serverlist"); - for (const auto& server : sl) + for (const auto* server : sl) { + const auto* parent = server->GetParent(); serializer.BeginBlock("server") - .Attribute("servername", server.servername) - .Attribute("parentname", server.parentname) - .Attribute("description", server.description) - .Attribute("usercount", server.usercount) - .Attribute("opercount", server.opercount) - .Attribute("lagmillisecs", server.latencyms) + .Attribute("servername", server->GetName()) + .Attribute("parentname", parent ? parent->GetName() : "") + .Attribute("description", server->GetDesc()) + .Attribute("usercount", server->GetUserCount()) + .Attribute("opercount", server->GetOperCount()) .EndBlock(); } serializer.EndBlock(); |
