diff options
author | Vladimir Glazounov <vg@openoffice.org> | 2008-06-04 08:44:08 +0000 |
---|---|---|
committer | Vladimir Glazounov <vg@openoffice.org> | 2008-06-04 08:44:08 +0000 |
commit | 01de82399862f885283821848c578c223beed139 (patch) | |
tree | fe0bd9b6db70076249dfb22f12194fa34a28d00c /ucb | |
parent | 60edb8c9f7d94c74c0de00f6fff56cb5cecfc669 (diff) |
INTEGRATION: CWS tkr10 (1.53.14); FILE MERGED
2008/05/19 09:27:11 tkr 1.53.14.3: RESYNC: (1.53-1.54); FILE MERGED
2008/04/21 09:51:15 tkr 1.53.14.2: #15111# build error (linux)
2008/04/18 12:50:35 tkr 1.53.14.1: #151111# thread safeness
Diffstat (limited to 'ucb')
-rw-r--r-- | ucb/source/ucp/webdav/NeonSession.cxx | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/ucb/source/ucp/webdav/NeonSession.cxx b/ucb/source/ucp/webdav/NeonSession.cxx index 964880a968..212dfb3aba 100644 --- a/ucb/source/ucp/webdav/NeonSession.cxx +++ b/ucb/source/ucp/webdav/NeonSession.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: NeonSession.cxx,v $ - * $Revision: 1.54 $ + * $Revision: 1.55 $ * * This file is part of OpenOffice.org. * @@ -127,7 +127,7 @@ RequestDataMap; // ------------------------------------------------------------------- // static members! bool NeonSession::m_bGlobalsInited = false; - +osl::Mutex NeonSession::m_aGlobalMutex; // ------------------------------------------------------------------- // Helper fuction // ------------------------------------------------------------------- @@ -614,18 +614,21 @@ void NeonSession::Init() if ( m_pHttpSession == 0 ) { - // Ensure that Neon sockets are initialized. + // Ensure that Neon sockets are initialize + + // --> 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 ); + // <-- if ( !m_bGlobalsInited ) { if ( ne_sock_init() != 0 ) throw DAVException( DAVException::DAV_SESSION_CREATE, NeonUri::makeConnectionEndPointString( m_aHostName, m_nPort ) ); - // #122205# - libxml2 needs to be initialized once if used by // multithreaded programs like OOo. xmlInitParser(); - m_bGlobalsInited = true; } |