Kaydet (Commit) 12310746 authored tarafından Caolán McNamara's avatar Caolán McNamara

accumulate into an OStringBuffer

üst 2d152606
......@@ -669,22 +669,24 @@ void OfficeIPCThread::execute()
// down during wait
osl::ClearableMutexGuard aGuard( GetMutex() );
ByteString aArguments;
// test byte by byte
const int nBufSz = 2048;
char pBuf[nBufSz];
int nBytes = 0;
int nResult = 0;
rtl::OStringBuffer aBuf;
// read into pBuf until '\0' is read or read-error
while ((nResult=maStreamPipe.recv( pBuf+nBytes, nBufSz-nBytes))>0) {
nBytes += nResult;
if (pBuf[nBytes-1]=='\0') {
aArguments += pBuf;
aBuf.append(pBuf);
break;
}
}
// don't close pipe ...
ByteString aArguments = aBuf.makeStringAndClear();
// Is this a lookup message from another application? if so, ignore
if ( aArguments.Len() == 0 )
continue;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment