summaryrefslogtreecommitdiff
path: root/fpicker
diff options
context:
space:
mode:
authorTino Rachui <tra@openoffice.org>2001-11-30 10:47:58 +0000
committerTino Rachui <tra@openoffice.org>2001-11-30 10:47:58 +0000
commit7f3bd017e12bbf1d020423dc2a8618a8b4b05698 (patch)
tree1bfcc64f78ee5b16ccef96932333053fe1a20cef /fpicker
parentfa7025fd6444b7c26288042727f8f51edf1636e9 (diff)
#95423#removed unnecessary locking of rBHelper mutex which may leed to deadlocks in run method
Diffstat (limited to 'fpicker')
-rw-r--r--fpicker/source/win32/filepicker/asynceventnotifier.cxx49
1 files changed, 22 insertions, 27 deletions
diff --git a/fpicker/source/win32/filepicker/asynceventnotifier.cxx b/fpicker/source/win32/filepicker/asynceventnotifier.cxx
index 86a4a3d68ee7..65f93838a8ac 100644
--- a/fpicker/source/win32/filepicker/asynceventnotifier.cxx
+++ b/fpicker/source/win32/filepicker/asynceventnotifier.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: asynceventnotifier.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: tra $ $Date: 2001-11-15 16:00:57 $
+ * last change: $Author: tra $ $Date: 2001-11-30 11:47:58 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -149,39 +149,34 @@ void SAL_CALL CAsyncFilePickerEventNotifier::run( )
if ( !m_rBroadcastHelper.bDisposed )
{
- ::osl::MutexGuard aGuard( m_rBroadcastHelper.rMutex );
-
- if ( !m_rBroadcastHelper.bDisposed )
+ while ( m_FilePickerEventList.size() > 0 )
{
- while ( m_FilePickerEventList.size() > 0 )
- {
- ClearableMutexGuard aGuard( m_FilePickerEventListMutex );
+ ClearableMutexGuard aGuard( m_FilePickerEventListMutex );
+
+ FilePickerEventRecord_t nextEventRecord = m_FilePickerEventList.front();
+ m_FilePickerEventList.pop_front();
- FilePickerEventRecord_t nextEventRecord = m_FilePickerEventList.front();
- m_FilePickerEventList.pop_front();
+ aGuard.clear();
- aGuard.clear();
+ ::cppu::OInterfaceContainerHelper* pICHelper =
+ m_rBroadcastHelper.aLC.getContainer(getCppuType((Reference<XFilePickerListener>*)0) );
- ::cppu::OInterfaceContainerHelper* pICHelper =
- m_rBroadcastHelper.aLC.getContainer(getCppuType((Reference<XFilePickerListener>*)0) );
+ if ( pICHelper )
+ {
+ ::cppu::OInterfaceIteratorHelper iter( *pICHelper );
- if ( pICHelper )
+ while( iter.hasMoreElements() )
{
- ::cppu::OInterfaceIteratorHelper iter( *pICHelper );
+ Reference< XFilePickerListener > xFPListener( iter.next( ), ::com::sun::star::uno::UNO_QUERY );
- while( iter.hasMoreElements() )
+ try
+ {
+ if ( xFPListener.is() )
+ (xFPListener.get()->*nextEventRecord.first)(nextEventRecord.second);
+ }
+ catch( RuntimeException& )
{
- Reference< XFilePickerListener > xFPListener( iter.next( ), ::com::sun::star::uno::UNO_QUERY );
-
- try
- {
- if ( xFPListener.is() )
- (xFPListener.get()->*nextEventRecord.first)(nextEventRecord.second);
- }
- catch( RuntimeException& )
- {
- OSL_ENSURE( sal_False, "RuntimeException during event dispatching" );
- }
+ OSL_ENSURE( sal_False, "RuntimeException during event dispatching" );
}
}
}