[Libreoffice-commits] online.git: loolwsd/LOOLBroker.cpp
Henry Castro
hcastro at collabora.com
Mon Dec 28 14:26:55 PST 2015
loolwsd/LOOLBroker.cpp | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
New commits:
commit d185f738ee06376bb914f8dbca2de6a9160819e4
Author: Henry Castro <hcastro at collabora.com>
Date: Mon Dec 28 18:24:59 2015 -0400
loolwsd: revert, remove unnecessary local buffer
diff --git a/loolwsd/LOOLBroker.cpp b/loolwsd/LOOLBroker.cpp
index 4ce6bdf..836ef1d 100644
--- a/loolwsd/LOOLBroker.cpp
+++ b/loolwsd/LOOLBroker.cpp
@@ -402,6 +402,7 @@ public:
void run() override
{
std::string aMessage;
+ char aBuffer[1024];
char* pStart;
char* pEnd;
@@ -412,8 +413,8 @@ public:
aPoll.events = POLLIN;
aPoll.revents = 0;
- pStart = _aBuffer;
- pEnd = _aBuffer;
+ pStart = aBuffer;
+ pEnd = aBuffer;
static const std::string thread_name = "broker_pipe_reader";
#ifdef __linux
@@ -436,15 +437,15 @@ public:
else
if (aPoll.revents & POLLIN)
{
- nBytes = Util::readFIFO(readerBroker, _aBuffer, sizeof(_aBuffer));
+ nBytes = Util::readFIFO(readerBroker, aBuffer, sizeof(aBuffer));
if (nBytes < 0)
{
pStart = pEnd = nullptr;
Log::error("Error reading message from pipe [" + FIFO_FILE + "].");
continue;
}
- pStart = _aBuffer;
- pEnd = _aBuffer + nBytes;
+ pStart = aBuffer;
+ pEnd = aBuffer + nBytes;
}
else
if (aPoll.revents & (POLLERR | POLLHUP))
More information about the Libreoffice-commits
mailing list