[Libreoffice-commits] online.git: loolwsd/Admin.hpp
Miklos Vajna
vmiklos at collabora.co.uk
Thu Feb 18 13:46:05 UTC 2016
loolwsd/Admin.hpp | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
New commits:
commit bad184ced8c664dc7160c5eca1c9ca72538de734
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Thu Feb 18 14:45:32 2016 +0100
loolwsd: -Werror=shadow
diff --git a/loolwsd/Admin.hpp b/loolwsd/Admin.hpp
index 858aeb0..f4ff11f 100644
--- a/loolwsd/Admin.hpp
+++ b/loolwsd/Admin.hpp
@@ -145,27 +145,27 @@ public:
// We need to ask Broker to give us some numbers on docs/clients/etc.
// But we can also collect some memory info using system calls.
- std::string response;
+ std::string statsResponse;
const auto cmd = "pstree -a -c -h -A -p " + std::to_string(getpid());
FILE* fp = popen(cmd.c_str(), "r");
if (fp == nullptr)
{
- response = "error: failed to collect stats.";
- ws->sendFrame(response.data(), response.size());
+ statsResponse = "error: failed to collect stats.";
+ ws->sendFrame(statsResponse.data(), statsResponse.size());
continue;
}
- char buffer[1024];
- while (fgets(buffer, sizeof(buffer)-1, fp) != nullptr)
+ char treeBuffer[1024];
+ while (fgets(treeBuffer, sizeof(treeBuffer)-1, fp) != nullptr)
{
- response += buffer;
- response += "</ BR>\n";
+ statsResponse += treeBuffer;
+ statsResponse += "</ BR>\n";
}
pclose(fp);
- ws->sendFrame(response.data(), response.size());
+ ws->sendFrame(statsResponse.data(), statsResponse.size());
}
}
}
More information about the Libreoffice-commits
mailing list