summaryrefslogtreecommitdiff
path: root/desktop/source/offacc
diff options
context:
space:
mode:
authorJoachim Lingner <jl@openoffice.org>2010-05-17 16:42:05 +0200
committerJoachim Lingner <jl@openoffice.org>2010-05-17 16:42:05 +0200
commit885511f9be6f9e437687216affc1fb5c7d99054b (patch)
treea1c29946036dcb07d0b236bb5f2eaab0cd702ab5 /desktop/source/offacc
parentd0a3afc82beed2c1d2e0035a0cc5d43bb6acf774 (diff)
jl152 #i77196# office hangs in smoketest when it is about to restart itself
Diffstat (limited to 'desktop/source/offacc')
-rw-r--r--desktop/source/offacc/acceptor.cxx6
-rw-r--r--desktop/source/offacc/acceptor.hxx1
2 files changed, 7 insertions, 0 deletions
diff --git a/desktop/source/offacc/acceptor.cxx b/desktop/source/offacc/acceptor.cxx
index 4eee12f5949a..4e100fd99665 100644
--- a/desktop/source/offacc/acceptor.cxx
+++ b/desktop/source/offacc/acceptor.cxx
@@ -67,6 +67,7 @@ Acceptor::Acceptor( const Reference< XMultiServiceFactory >& rFactory )
, m_aConnectString()
, m_aProtocol()
, m_bInit(sal_False)
+ , m_bDying(false)
{
m_rSMgr = rFactory;
m_rAcceptor = Reference< XAcceptor > (m_rSMgr->createInstance(
@@ -88,6 +89,9 @@ Acceptor::~Acceptor()
osl::MutexGuard g(m_aMutex);
t = m_thread;
}
+ //prevent locking if the thread is still waiting
+ m_bDying = true;
+ m_cEnable.set();
osl_joinWithThread(t);
{
// Make the final state of m_bridges visible to this thread (since
@@ -117,6 +121,8 @@ void SAL_CALL Acceptor::run()
RTL_LOGFILE_CONTEXT_TRACE( aLog, "desktop (lo119109)"\
"Acceptor::run waiting for office to come up");
m_cEnable.wait();
+ if (m_bDying) //see destructor
+ break;
RTL_LOGFILE_CONTEXT_TRACE( aLog, "desktop (lo119109)"\
"Acceptor::run now enabled and continuing");
diff --git a/desktop/source/offacc/acceptor.hxx b/desktop/source/offacc/acceptor.hxx
index 1693dd8b75d0..87f50db032dd 100644
--- a/desktop/source/offacc/acceptor.hxx
+++ b/desktop/source/offacc/acceptor.hxx
@@ -83,6 +83,7 @@ private:
OUString m_aProtocol;
sal_Bool m_bInit;
+ bool m_bDying;
public:
Acceptor( const Reference< XMultiServiceFactory >& aFactory );