summaryrefslogtreecommitdiff
path: root/ucb
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-09-10 12:39:57 +0100
committerCaolán McNamara <caolanm@redhat.com>2018-09-10 18:20:00 +0200
commitcbc79e563612e9a2eaf66d1e63f98d5094c09d62 (patch)
tree45f3f1fd751f337b2657a93da22a113af520caae /ucb
parent12637b0f83b3a3d9d740882e0e8e7cc0a442cde2 (diff)
add mutex guard to new methods
Change-Id: I4d6ae0622107df6f619f945575687f616f184ccc Reviewed-on: https://gerrit.libreoffice.org/60260 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'ucb')
-rw-r--r--ucb/source/ucp/webdav-neon/NeonSession.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/ucb/source/ucp/webdav-neon/NeonSession.cxx b/ucb/source/ucp/webdav-neon/NeonSession.cxx
index c79090cd41db..38ff0ec7925f 100644
--- a/ucb/source/ucp/webdav-neon/NeonSession.cxx
+++ b/ucb/source/ucp/webdav-neon/NeonSession.cxx
@@ -259,6 +259,8 @@ extern "C" int NeonSession_NeonAuth( void * inUserData,
int NeonSession::NeonAuth(const char* inAuthProtocol, const char* inRealm,
int attempt, char* inoutUserName, char * inoutPassWord)
{
+ osl::Guard< osl::Mutex > theGuard( m_aMutex );
+
/* The callback used to request the username and password in the given
* realm. The username and password must be copied into the buffers
* which are both of size NE_ABUFSIZ. The 'attempt' parameter is zero
@@ -384,6 +386,8 @@ extern "C" int NeonSession_CertificationNotify( void *userdata,
int NeonSession::CertificationNotify(const ne_ssl_certificate *cert)
{
+ osl::Guard< osl::Mutex > theGuard( m_aMutex );
+
OSL_ASSERT( cert );
uno::Reference< security::XCertificateContainer > xCertificateContainer;
@@ -537,6 +541,8 @@ extern "C" void NeonSession_PreSendRequest( ne_request * req,
void NeonSession::PreSendRequest(ne_request* req, ne_buffer* headers)
{
+ osl::Guard< osl::Mutex > theGuard( m_aMutex );
+
// If there is a proxy server in between, it shall never use
// cached data. We always want 'up-to-date' data.
ne_buffer_concat( headers, "Pragma: no-cache", EOL, nullptr );