summaryrefslogtreecommitdiff
path: root/extensions/source/oooimprovement/onlogrotate_job.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'extensions/source/oooimprovement/onlogrotate_job.cxx')
-rw-r--r--extensions/source/oooimprovement/onlogrotate_job.cxx33
1 files changed, 23 insertions, 10 deletions
diff --git a/extensions/source/oooimprovement/onlogrotate_job.cxx b/extensions/source/oooimprovement/onlogrotate_job.cxx
index c5f6b56be31a..d83c43bfcfd8 100644
--- a/extensions/source/oooimprovement/onlogrotate_job.cxx
+++ b/extensions/source/oooimprovement/onlogrotate_job.cxx
@@ -128,17 +128,21 @@ namespace
}
{
::osl::Guard< ::osl::Mutex> service_factory_guard(m_ServiceFactoryMutex);
- if(m_ServiceFactory.is())
+ try
{
- if(Config(m_ServiceFactory).getInvitationAccepted())
+ if(m_ServiceFactory.is())
{
- packLogs(m_ServiceFactory);
- uploadLogs(m_ServiceFactory);
+ if(Config(m_ServiceFactory).getInvitationAccepted())
+ {
+ packLogs(m_ServiceFactory);
+ uploadLogs(m_ServiceFactory);
+ }
+ else
+ LogStorage(m_ServiceFactory).clear();
}
- else
- LogStorage(m_ServiceFactory).clear();
+ m_ServiceFactory.clear();
}
- m_ServiceFactory.clear();
+ catch(...) {}
}
}
@@ -158,16 +162,25 @@ namespace
m_Thread->create();
}
virtual ~OnLogRotateThreadWatcher()
- { m_Thread->disposing()->terminate(); };
+ {
+ m_Thread->disposing()->terminate();
+ m_Thread->join();
+ };
// XTerminateListener
virtual void SAL_CALL queryTermination(const EventObject&) throw(RuntimeException)
{ };
virtual void SAL_CALL notifyTermination(const EventObject&) throw(RuntimeException)
- { m_Thread->disposing()->terminate(); };
+ {
+ m_Thread->disposing()->terminate();
+ m_Thread->join();
+ };
// XEventListener
virtual void SAL_CALL disposing(const EventObject&) throw(RuntimeException)
- { m_Thread->disposing()->terminate(); };
+ {
+ m_Thread->disposing()->terminate();
+ m_Thread->join();
+ };
private:
::std::auto_ptr<OnLogRotateThread> m_Thread;
};