[Libreoffice-commits] online.git: loolwsd/IoUtil.cpp loolwsd/IoUtil.hpp loolwsd/LOOLWSD.cpp
Tor Lillqvist
tml at collabora.com
Wed Oct 12 16:38:07 UTC 2016
loolwsd/IoUtil.cpp | 8 ++++----
loolwsd/IoUtil.hpp | 8 ++++----
loolwsd/LOOLWSD.cpp | 2 +-
3 files changed, 9 insertions(+), 9 deletions(-)
New commits:
commit dc7f5614819f95856dec6ae3322a6763bf21c323
Author: Tor Lillqvist <tml at collabora.com>
Date: Wed Oct 12 19:07:54 2016 +0300
Don't use 'FIFO' in function names as we don't use FIFOs any more
No functional changes.
diff --git a/loolwsd/IoUtil.cpp b/loolwsd/IoUtil.cpp
index bb861dd..1160b15 100644
--- a/loolwsd/IoUtil.cpp
+++ b/loolwsd/IoUtil.cpp
@@ -214,7 +214,7 @@ void shutdownWebSocket(const std::shared_ptr<Poco::Net::WebSocket>& ws)
}
-ssize_t writeFIFO(int pipe, const char* buffer, ssize_t size)
+ssize_t writeToPipe(int pipe, const char* buffer, ssize_t size)
{
ssize_t count = 0;
while(true)
@@ -244,7 +244,7 @@ ssize_t writeFIFO(int pipe, const char* buffer, ssize_t size)
return count;
}
-ssize_t readFIFO(int pipe, char* buffer, ssize_t size)
+ssize_t readFromPipe(int pipe, char* buffer, ssize_t size)
{
ssize_t bytes;
do
@@ -302,8 +302,8 @@ int PipeReader::readLine(std::string& line,
else if (pipe.revents & (POLLIN | POLLPRI))
{
char buffer[READ_BUFFER_SIZE];
- const auto bytes = readFIFO(_pipe, buffer, sizeof(buffer));
- Log::trace() << "readFIFO for pipe: " << _name << " returned: " << bytes << Log::end;
+ const auto bytes = readFromPipe(_pipe, buffer, sizeof(buffer));
+ Log::trace() << "readFromPipe for pipe: " << _name << " returned: " << bytes << Log::end;
if (bytes < 0)
{
return -1;
diff --git a/loolwsd/IoUtil.hpp b/loolwsd/IoUtil.hpp
index a213497..69819c2 100644
--- a/loolwsd/IoUtil.hpp
+++ b/loolwsd/IoUtil.hpp
@@ -36,14 +36,14 @@ namespace IoUtil
/// Call WebSocket::shutdown() ignoring Poco::IOException.
void shutdownWebSocket(const std::shared_ptr<Poco::Net::WebSocket>& ws);
- ssize_t writeFIFO(int pipe, const char* buffer, ssize_t size);
+ ssize_t writeToPipe(int pipe, const char* buffer, ssize_t size);
inline
- ssize_t writeFIFO(int pipe, const std::string& message)
+ ssize_t writeToPipe(int pipe, const std::string& message)
{
- return writeFIFO(pipe, message.c_str(), message.size());
+ return writeToPipe(pipe, message.c_str(), message.size());
}
- ssize_t readFIFO(int pipe, char* buffer, ssize_t size);
+ ssize_t readFromPipe(int pipe, char* buffer, ssize_t size);
/// Helper class to handle reading from a pipe.
class PipeReader
diff --git a/loolwsd/LOOLWSD.cpp b/loolwsd/LOOLWSD.cpp
index 8b3cec2..8b6e601 100644
--- a/loolwsd/LOOLWSD.cpp
+++ b/loolwsd/LOOLWSD.cpp
@@ -228,7 +228,7 @@ static void forkChildren(const int number)
Util::checkDiskSpaceOnRegisteredFileSystems();
const std::string aMessage = "spawn " + std::to_string(number) + "\n";
Log::debug("MasterToForKit: " + aMessage.substr(0, aMessage.length() - 1));
- IoUtil::writeFIFO(LOOLWSD::ForKitWritePipe, aMessage);
+ IoUtil::writeToPipe(LOOLWSD::ForKitWritePipe, aMessage);
lastForkRequestTime = std::chrono::steady_clock::now();
}
}
More information about the Libreoffice-commits
mailing list