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 | 1acbdacfa460ef7c957fb4fbf7d0233dede6592a (patch) | |
tree | 9158056a0dab1a9f23d9ad8a028d5f027853625b /ucb | |
parent | 5361a7d719663530b464d7a5b4ee61295ae913e9 (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 f6c09d264d58..d12130fdffac 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; } |