[openoffice.org] fix up patch

Caolan McNamara caolanm at fedoraproject.org
Tue Sep 28 20:00:57 UTC 2010


commit e752c3520d70f7e91f22d7ff6615eb40fa452e4d
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Sep 28 21:00:38 2010 +0100

    fix up patch

 ...ice.org-3.3.0.rh637738.libgcrypt.addmutex.patch |   89 ++++++++++----------
 1 files changed, 45 insertions(+), 44 deletions(-)
---
diff --git a/openoffice.org-3.3.0.rh637738.libgcrypt.addmutex.patch b/openoffice.org-3.3.0.rh637738.libgcrypt.addmutex.patch
index 0d9154c..7fc97cb 100644
--- a/openoffice.org-3.3.0.rh637738.libgcrypt.addmutex.patch
+++ b/openoffice.org-3.3.0.rh637738.libgcrypt.addmutex.patch
@@ -25,7 +25,7 @@ diff -ru ucb.orig/source/ucp/webdav/NeonHeadRequest.cxx ucb/source/ucp/webdav/Ne
 diff -ru ucb.orig/source/ucp/webdav/NeonSession.cxx ucb/source/ucp/webdav/NeonSession.cxx
 --- ucb.orig/source/ucp/webdav/NeonSession.cxx	2010-09-27 11:08:46.000000000 +0100
 +++ ucb/source/ucp/webdav/NeonSession.cxx	2010-09-27 13:26:01.000000000 +0100
-@@ -118,7 +118,12 @@
+@@ -618,7 +618,12 @@
  // -------------------------------------------------------------------
  // static members!
  bool NeonSession::m_bGlobalsInited = false;
@@ -36,10 +36,10 @@ diff -ru ucb.orig/source/ucp/webdav/NeonSession.cxx ucb/source/ucp/webdav/NeonSe
 +//initializes it first, and as non-thread-safe, leaving the entire
 +//stack unsafe
 +osl::Mutex aGlobalNeonMutex;
+ NeonLockStore NeonSession::m_aNeonLockStore;
+ 
  // -------------------------------------------------------------------
- // Helper fuction
- // -------------------------------------------------------------------
-@@ -665,7 +670,10 @@
+@@ -647,7 +652,10 @@
  {
      if ( m_pHttpSession )
      {
@@ -49,22 +49,22 @@ diff -ru ucb.orig/source/ucp/webdav/NeonSession.cxx ucb/source/ucp/webdav/NeonSe
 +            ne_session_destroy( m_pHttpSession );
 +        }
          m_pHttpSession = 0;
- 	// Note: Uncomment the following if locking support is required
- 	/*
-@@ -691,11 +699,7 @@
+     }
+     delete static_cast< RequestDataMap * >( m_pRequestData );
+@@ -673,11 +681,7 @@
      if ( m_pHttpSession == 0 )
      {
-         // Ensure that Neon sockets are initialize
+         // Ensure that Neon sockets are initialized
 -
--		// --> tkr #151111# crashed if copy and pasted pictures from the internet
--		// ne_sock_init() was executed by two threads at the same time.
--		osl::Guard< osl::Mutex > theGlobalGuard( m_aGlobalMutex );
--		// <--
+-        // --> tkr #151111# crashed if copy and pasted pictures from the internet
+-        // ne_sock_init() was executed by two threads at the same time.
+-        osl::Guard< osl::Mutex > theGlobalGuard( m_aGlobalMutex );
+-        // <--
 +        osl::Guard< osl::Mutex > theGlobalGuard( aGlobalNeonMutex );
          if ( !m_bGlobalsInited )
          {
              if ( ne_sock_init() != 0 )
-@@ -730,7 +734,10 @@
+@@ -726,7 +730,10 @@
              m_nProxyPort = rProxyCfg.nPort;
  
              // new session needed, destroy old first
@@ -76,18 +76,18 @@ diff -ru ucb.orig/source/ucp/webdav/NeonSession.cxx ucb/source/ucp/webdav/NeonSe
              m_pHttpSession = 0;
              bCreateNewSession = true;
          }
-@@ -743,14 +750,15 @@
+@@ -739,14 +746,15 @@
          //     currently (0.22.0) neon does not allow to pass the user info
          //     to the session
  
 -        m_pHttpSession = ne_session_create(
--	    rtl::OUStringToOString( m_aScheme,
--				    RTL_TEXTENCODING_UTF8 ).getStr(),
--	    /* theUri.GetUserInfo(),
--	       @@@ for FTP via HTTP proxy, but not supported by Neon */
--	    rtl::OUStringToOString( m_aHostName,
--				    RTL_TEXTENCODING_UTF8 ).getStr(),
--	    m_nPort );
+-            rtl::OUStringToOString( m_aScheme,
+-                RTL_TEXTENCODING_UTF8 ).getStr(),
+-            /* theUri.GetUserInfo(),
+-               @@@ for FTP via HTTP proxy, but not supported by Neon */
+-            rtl::OUStringToOString( m_aHostName,
+-                                    RTL_TEXTENCODING_UTF8 ).getStr(),
+-            m_nPort );
 +        {
 +            osl::Guard< osl::Mutex > theGlobalGuard( aGlobalNeonMutex );
 +            m_pHttpSession = ne_session_create(
@@ -97,29 +97,30 @@ diff -ru ucb.orig/source/ucp/webdav/NeonSession.cxx ucb/source/ucp/webdav/NeonSe
 +                rtl::OUStringToOString( m_aHostName, RTL_TEXTENCODING_UTF8 ).getStr(),
 +                m_nPort );
 +        }
- 	
+ 
          if ( m_pHttpSession == 0 )
              throw DAVException( DAVException::DAV_SESSION_CREATE,
-@@ -1316,11 +1324,11 @@
- void NeonSession::ABORT()
+@@ -1638,12 +1646,11 @@
+ void NeonSession::abort()
      throw ( DAVException )
  {
--	// 11.11.09 (tkr): The following code lines causing crashes if closing a ongoing connection. It turned out that this existing solution doesn't work in multi-threading environments. 
--	// So I disabled them in 3.2. . Issue #73893# should fix it in OOo 3.3.
--
--	//if (NULL !=m_pHttpSession)
--	//	ne_close_connection(m_pHttpSession);
-+    if (NULL != m_pHttpSession)
+-    // 11.11.09 (tkr): The following code lines causing crashes if
+-    // closing a ongoing connection. It turned out that this existing
+-    // solution doesn't work in multi-threading environments.
+-    // So I disabled them in 3.2. . Issue #73893# should fix it in OOo 3.3.
+-    //if ( m_pHttpSession )
+-    //    ne_close_connection( m_pHttpSession );
++    if ( m_pHttpSession )
 +    {
 +        osl::Guard< osl::Mutex > theGlobalGuard( aGlobalNeonMutex );
-+        ne_close_connection(m_pHttpSession);
++        ne_close_connection( m_pHttpSession );
 +    }
  }
  
  // -------------------------------------------------------------------
-@@ -1703,7 +1711,10 @@
- #endif
-     ne_add_response_body_reader( req, ne_accept_2xx, reader, userdata );
+@@ -1934,7 +1941,10 @@
+     ne_decompress * dc
+         = ne_decompress_reader( req, ne_accept_2xx, reader, userdata );
  
 -    ret = ne_request_dispatch( req );
 +    {
@@ -129,7 +130,7 @@ diff -ru ucb.orig/source/ucp/webdav/NeonSession.cxx ucb/source/ucp/webdav/NeonSe
  
  #if NEON_VERSION >= 0x0250
      if ( getheaders )
-@@ -1741,7 +1752,10 @@
+@@ -1974,7 +1984,10 @@
  
      ne_set_request_body_buffer( req, buffer, size );
  
@@ -141,7 +142,7 @@ diff -ru ucb.orig/source/ucp/webdav/NeonSession.cxx ucb/source/ucp/webdav/NeonSe
  
      if ( ret == NE_OK && ne_get_status( req )->klass != 2 )
          ret = NE_ERROR;
-@@ -1786,7 +1800,10 @@
+@@ -2019,7 +2032,10 @@
  
      ne_set_request_body_buffer( req, buffer, strlen( buffer ) );
  
@@ -156,11 +157,11 @@ diff -ru ucb.orig/source/ucp/webdav/NeonSession.cxx ucb/source/ucp/webdav/NeonSe
 diff -ru ucb.orig/source/ucp/webdav/NeonSession.hxx ucb/source/ucp/webdav/NeonSession.hxx
 --- ucb.orig/source/ucp/webdav/NeonSession.hxx	2010-09-27 11:08:46.000000000 +0100
 +++ ucb/source/ucp/webdav/NeonSession.hxx	2010-09-27 13:06:43.000000000 +0100
-@@ -50,7 +50,6 @@
- {
- 	private:
-         osl::Mutex        m_aMutex;
--		static osl::Mutex m_aGlobalMutex;
-         rtl::OUString     m_aScheme;
-         rtl::OUString     m_aHostName;
-         rtl::OUString     m_aProxyName;
+@@ -66,7 +66,6 @@
+     DAVRequestEnvironment m_aEnv;
+ 
+     static bool          m_bGlobalsInited;
+-    static osl::Mutex m_aGlobalMutex;
+     static NeonLockStore m_aNeonLockStore;
+ 
+ protected:


More information about the scm-commits mailing list