summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2012-12-13 15:08:30 +0100
committerStephan Bergmann <sbergman@redhat.com>2012-12-13 15:58:08 +0100
commite956803c8fbd8d432b860a55c3ba8399bcd03361 (patch)
treed24266c76a6457ee0cfe692418718d322b51990d /desktop
parentcc9329c52c8327f0d8b52162755959bac9364265 (diff)
Reduce scope of OfficeIPCThread::maStreamPipe
(Also, its destructor will close it when it goes out of scope.) Change-Id: Iaa9bebce3c0bda780f4c80c193ce619c2e6d5768
Diffstat (limited to 'desktop')
-rw-r--r--desktop/source/app/officeipcthread.cxx12
-rw-r--r--desktop/source/app/officeipcthread.hxx1
2 files changed, 6 insertions, 7 deletions
diff --git a/desktop/source/app/officeipcthread.cxx b/desktop/source/app/officeipcthread.cxx
index 7d477a774614..e287d2b4ec2b 100644
--- a/desktop/source/app/officeipcthread.cxx
+++ b/desktop/source/app/officeipcthread.cxx
@@ -643,7 +643,6 @@ OfficeIPCThread::~OfficeIPCThread()
if ( mpDispatchWatcher )
mpDispatchWatcher->release();
maPipe.close();
- maStreamPipe.close();
pGlobalOfficeIPCThread.clear();
}
@@ -662,7 +661,8 @@ void OfficeIPCThread::execute()
{
do
{
- oslPipeError nError = maPipe.accept( maStreamPipe );
+ osl::StreamPipe aStreamPipe;
+ oslPipeError nError = maPipe.accept( aStreamPipe );
if( nError == osl_Pipe_E_None )
@@ -686,10 +686,10 @@ void OfficeIPCThread::execute()
int nBytes = 0;
int nResult = 0;
while (
- (nResult = maStreamPipe.send(sc_aSendArgumentsSequence+nBytes, sc_nCSASeqLength-nBytes))>0 &&
+ (nResult = aStreamPipe.send(sc_aSendArgumentsSequence+nBytes, sc_nCSASeqLength-nBytes))>0 &&
((nBytes += nResult) < sc_nCSASeqLength) ) ;
}
- maStreamPipe.write("\0", 1);
+ aStreamPipe.write("\0", 1);
// test byte by byte
const int nBufSz = 2048;
@@ -698,7 +698,7 @@ void OfficeIPCThread::execute()
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) {
+ while ((nResult=aStreamPipe.recv( pBuf+nBytes, nBufSz-nBytes))>0) {
nBytes += nResult;
if (pBuf[nBytes-1]=='\0') {
aBuf.append(pBuf);
@@ -927,7 +927,7 @@ void OfficeIPCThread::execute()
// processing finished, inform the requesting end
nBytes = 0;
while (
- (nResult = maStreamPipe.send(sc_aConfirmationSequence+nBytes, sc_nCSeqLength-nBytes))>0 &&
+ (nResult = aStreamPipe.send(sc_aConfirmationSequence+nBytes, sc_nCSeqLength-nBytes))>0 &&
((nBytes += nResult) < sc_nCSeqLength) ) ;
}
else
diff --git a/desktop/source/app/officeipcthread.hxx b/desktop/source/app/officeipcthread.hxx
index 3dd7eac5197c..c07da3d9ce63 100644
--- a/desktop/source/app/officeipcthread.hxx
+++ b/desktop/source/app/officeipcthread.hxx
@@ -72,7 +72,6 @@ class OfficeIPCThread : public salhelper::Thread
static rtl::Reference< OfficeIPCThread > pGlobalOfficeIPCThread;
osl::Pipe maPipe;
- osl::StreamPipe maStreamPipe;
rtl::OUString maPipeIdent;
bool mbDowning;
bool mbRequestsEnabled;