summaryrefslogtreecommitdiff
path: root/ucb/source/ucp/webdav/NeonSession.cxx
diff options
context:
space:
mode:
authorRüdiger Timm <rt@openoffice.org>2005-10-18 07:47:02 +0000
committerRüdiger Timm <rt@openoffice.org>2005-10-18 07:47:02 +0000
commit11de6fb6a6682e42e1d6046436ad40be70279af7 (patch)
tree9f4f296c0e8b612bb63e81ddcbef066b3301e2ad /ucb/source/ucp/webdav/NeonSession.cxx
parentebad3b20d2518436b358457650682406e336fe31 (diff)
INTEGRATION: CWS kso201bugs01 (1.34.32); FILE MERGED
2005/10/06 09:55:57 kso 1.34.32.2: RESYNC: (1.34-1.35); FILE MERGED 2005/08/24 11:39:25 kso 1.34.32.1: #122205# - libxml2 must be initialized before it can be used safely by multithreaded applications.
Diffstat (limited to 'ucb/source/ucp/webdav/NeonSession.cxx')
-rw-r--r--ucb/source/ucp/webdav/NeonSession.cxx18
1 files changed, 13 insertions, 5 deletions
diff --git a/ucb/source/ucp/webdav/NeonSession.cxx b/ucb/source/ucp/webdav/NeonSession.cxx
index ebbd4757ee1f..261ebb7ea536 100644
--- a/ucb/source/ucp/webdav/NeonSession.cxx
+++ b/ucb/source/ucp/webdav/NeonSession.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: NeonSession.cxx,v $
*
- * $Revision: 1.35 $
+ * $Revision: 1.36 $
*
- * last change: $Author: rt $ $Date: 2005-09-09 16:12:57 $
+ * last change: $Author: rt $ $Date: 2005-10-18 08:47:02 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -48,6 +48,10 @@
#include <neon/ne_locks.h>
#endif
+#ifndef __XML_PARSER_H__
+#include "libxml/parser.h"
+#endif
+
#ifndef _RTL_USTRBUF_HXX_
#include <rtl/ustrbuf.hxx>
#endif
@@ -133,7 +137,7 @@ RequestDataMap;
// -------------------------------------------------------------------
// static members!
-bool NeonSession::m_bSockInited = false;
+bool NeonSession::m_bGlobalsInited = false;
// -------------------------------------------------------------------
// Helper fuction
@@ -543,13 +547,17 @@ void NeonSession::Init()
if ( m_pHttpSession == 0 )
{
// Ensure that Neon sockets are initialized.
- if ( !m_bSockInited )
+ if ( !m_bGlobalsInited )
{
if ( ne_sock_init() != 0 )
throw DAVException( DAVException::DAV_SESSION_CREATE,
NeonUri::makeConnectionEndPointString(
m_aHostName, m_nPort ) );
- m_bSockInited = true;
+ // #122205# libxml2 needs to be initialized once if used by
+ // multithreaded programs like OOo
+ xmlInitParser();
+
+ m_bGlobalsInited = true;
}
const ucbhelper::InternetProxyServer & rProxyCfg = getProxySettings();