diff options
author | Caolán McNamara <caolanm@redhat.com> | 2012-02-23 16:12:18 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-02-23 20:45:02 +0000 |
commit | 12310746edc0f43e4b1be84e311dd0dee12701cd (patch) | |
tree | 61cb0089db02dd68df809d24726c93d9fb5e8786 /desktop | |
parent | 2d15260688aca175b5ce19d6b65cacf177c14532 (diff) |
accumulate into an OStringBuffer
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/source/app/officeipcthread.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/desktop/source/app/officeipcthread.cxx b/desktop/source/app/officeipcthread.cxx index a0d2f3fe78bb..38babd8cecf9 100644 --- a/desktop/source/app/officeipcthread.cxx +++ b/desktop/source/app/officeipcthread.cxx @@ -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; |