diff options
author | Lionel Elie Mamane <lionel@mamane.lu> | 2012-02-22 06:53:51 +0100 |
---|---|---|
committer | Lionel Elie Mamane <lionel@mamane.lu> | 2012-06-04 23:43:42 +0200 |
commit | 475bafc4be1b113095e1b0dcacfd565374777f8d (patch) | |
tree | 077dcbe90be5095fc9a9eddc39a8c789283e9d41 /connectivity/source | |
parent | 43f9468d3529ab7e6f20a5ba3ae12dc14ead4193 (diff) |
Replace manual Mutex handling by clearable guard
Change-Id: I4c20bf3a2aa5ca908db233e54f50404cc7466d72
Diffstat (limited to 'connectivity/source')
-rw-r--r-- | connectivity/source/drivers/mozab/mozillasrc/MQueryHelper.cxx | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/connectivity/source/drivers/mozab/mozillasrc/MQueryHelper.cxx b/connectivity/source/drivers/mozab/mozillasrc/MQueryHelper.cxx index 6e9079c6271b..eed6e97f2ff2 100644 --- a/connectivity/source/drivers/mozab/mozillasrc/MQueryHelper.cxx +++ b/connectivity/source/drivers/mozab/mozillasrc/MQueryHelper.cxx @@ -222,28 +222,24 @@ MQueryHelper::getByIndex( sal_uInt32 nRow ) } do { - // Obtain the Mutex - don't use a guard as we want to be able to release - // and acquire again... - m_aMutex.acquire(); + ::osl::ClearableMutexGuard aGuard( m_aMutex ); if ( nRow > m_aResults.size() ) { if ( m_bQueryComplete ) { m_bAtEnd = sal_True; - m_aMutex.release(); return( NULL ); } else { clearResultOrComplete(); - m_aMutex.release(); + aGuard.clear(); if ( !waitForResultOrComplete( ) ) return( NULL ); } } else { - m_aMutex.release(); return( m_aResults[ nRow -1 ] ); } } while ( sal_True ); |