ooo-build r11894 - in trunk: . patches/src680
- From: jholesovsky svn gnome org
- To: svn-commits-list gnome org
- Subject: ooo-build r11894 - in trunk: . patches/src680
- Date: Thu, 13 Mar 2008 16:08:46 +0000 (GMT)
Author: jholesovsky
Date: Thu Mar 13 16:08:46 2008
New Revision: 11894
URL: http://svn.gnome.org/viewvc/ooo-build?rev=11894&view=rev
Log:
2008-03-13 Jan Holesovsky <kendy suse cz>
* patches/src680/webdav-locking-unlock-on-crash.diff,
patches/src680/apply: Unlock the stream on crash/terminate/...
Added:
trunk/patches/src680/webdav-locking-unlock-on-crash.diff
Modified:
trunk/ChangeLog
trunk/patches/src680/apply
Modified: trunk/patches/src680/apply
==============================================================================
--- trunk/patches/src680/apply (original)
+++ trunk/patches/src680/apply Thu Mar 13 16:08:46 2008
@@ -533,6 +533,9 @@
# ne_lockstore_add() must be called _after_ ne_lock()
webdav-locking-lockstore.diff, i#29152, jholesov
+# unlock the stream on crash/terminate/...
+webdav-locking-unlock-on-crash.diff, i#29152, jholesov
+
[ QuickStarter ]
# External splash screen implementation / 2nd time accelerator
Added: trunk/patches/src680/webdav-locking-unlock-on-crash.diff
==============================================================================
--- (empty file)
+++ trunk/patches/src680/webdav-locking-unlock-on-crash.diff Thu Mar 13 16:08:46 2008
@@ -0,0 +1,79 @@
+diff --git ucb/source/ucp/webdav/NeonInputStream.cxx ucb/source/ucp/webdav/NeonInputStream.cxx
+index c969218..08b82c7 100644
+--- ucb/source/ucp/webdav/NeonInputStream.cxx
++++ ucb/source/ucp/webdav/NeonInputStream.cxx
+@@ -56,6 +56,15 @@ using namespace com::sun::star::io;
+ using namespace com::sun::star;
+ using namespace webdav_ucp;
+
++oslSignalAction NeonInputStream::UnlockOnSignal( void* pData, oslSignalInfo* pInfo )
++{
++ NeonInputStream *pStream = static_cast< NeonInputStream *>( pData );
++
++ if ( pStream )
++ pStream->Unlock();
++
++ return osl_Signal_ActCallNextHdl;
++}
+
+ // -------------------------------------------------------------------
+ // Constructor
+@@ -66,6 +75,7 @@ NeonInputStream::NeonInputStream()
+ m_bDirty( sal_False ),
+ m_pLock( NULL )
+ {
++ m_pSignalHandler = osl_addSignalHandler( NeonInputStream::UnlockOnSignal, this );
+ }
+
+ // -------------------------------------------------------------------
+@@ -74,6 +84,8 @@ NeonInputStream::NeonInputStream()
+ NeonInputStream::~NeonInputStream( void )
+ {
+ Unlock();
++
++ osl_removeSignalHandler( m_pSignalHandler );
+ }
+
+ // -------------------------------------------------------------------
+@@ -365,6 +377,10 @@ void SAL_CALL NeonInputStream::truncate( void )
+ // -------------------------------------------------------------------
+ void NeonInputStream::Unlock( void )
+ {
++#if OSL_DEBUG_LEVEL > 0
++ fprintf( stderr, "WebDAV: unlock()\n" );
++#endif
++
+ if ( m_pLock )
+ {
+ // FIXME It's really hacky to create the new session
+diff --git ucb/source/ucp/webdav/NeonInputStream.hxx ucb/source/ucp/webdav/NeonInputStream.hxx
+index ba470e6..8545cfd 100644
+--- ucb/source/ucp/webdav/NeonInputStream.hxx
++++ ucb/source/ucp/webdav/NeonInputStream.hxx
+@@ -38,6 +38,7 @@
+ #ifndef _SAL_TYPES_H_
+ #include <sal/types.h>
+ #endif
++#include <osl/signal.h>
+ #ifndef _RTL_USTRING_HXX_
+ #include <rtl/ustring.hxx>
+ #endif
+@@ -93,6 +94,8 @@ private:
+ com::sun::star::ucb::Lock *m_pLock;
+ rtl::OUString m_aURL;
+
++ oslSignalHandler m_pSignalHandler;
++
+ public:
+ NeonInputStream( void );
+ virtual ~NeonInputStream();
+@@ -199,6 +202,9 @@ protected:
+
+ // Unlock the stream & destroy the lock
+ void Unlock( void );
++
++ // Unlock the stream when OOo crashes/is terminated/...
++ static oslSignalAction UnlockOnSignal( void* pData, oslSignalInfo* pInfo );
+ };
+
+ } // namespace webdav_ucp
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]