summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCédric Bosdonnat <cedric.bosdonnat@free.fr>2012-06-26 16:28:21 +0200
committerCédric Bosdonnat <cedric.bosdonnat@free.fr>2012-06-27 10:15:44 +0200
commitfb6578d4cddf031f9c331536f353707c92b9666b (patch)
tree524022d4d607d851a00c532ba20c8f2e66ed50e5
parent5d41f72f8edf880c496831078fadf1f72ece9251 (diff)
CMIS UCP: Use the URL host as ID for cached sessions
Using the binding URL as ID for the cached sessions is bad as there may be several repositories on the same binding URL... which means different libcmis::Session objects. Change-Id: Id3605ee4fdfbfc32b72615fb573220e94c8748af
-rw-r--r--ucb/source/ucp/cmis/cmis_content.cxx7
-rw-r--r--ucb/source/ucp/cmis/cmis_provider.cxx6
2 files changed, 4 insertions, 9 deletions
diff --git a/ucb/source/ucp/cmis/cmis_content.cxx b/ucb/source/ucp/cmis/cmis_content.cxx
index bb6e1a0272ac..59febd9cc596 100644
--- a/ucb/source/ucp/cmis/cmis_content.cxx
+++ b/ucb/source/ucp/cmis/cmis_content.cxx
@@ -162,13 +162,14 @@ namespace cmis
m_sURL = m_xIdentifier->getContentIdentifier( );
cmis::URL url( m_sURL );
- // Look for a cached session
- m_pSession = pProvider->getSession( url.getBindingUrl( ) );
+ // Look for a cached session, key is binding url + repo id
+ INetURLObject aUrlObj( m_sURL );
+ m_pSession = pProvider->getSession( aUrlObj.GetHost( ) );
if ( NULL == m_pSession )
{
// Initiate a CMIS session and register it as we found nothing
m_pSession = libcmis::SessionFactory::createSession( url.getSessionParams( ) );
- pProvider->registerSession( url.getBindingUrl( ), m_pSession );
+ pProvider->registerSession( aUrlObj.GetHost( ), m_pSession );
}
m_sObjectPath = url.getObjectPath( );
diff --git a/ucb/source/ucp/cmis/cmis_provider.cxx b/ucb/source/ucp/cmis/cmis_provider.cxx
index a13e9f777ff1..f65a1ca47969 100644
--- a/ucb/source/ucp/cmis/cmis_provider.cxx
+++ b/ucb/source/ucp/cmis/cmis_provider.cxx
@@ -88,16 +88,10 @@ ContentProvider::ContentProvider(
const uno::Reference< lang::XMultiServiceFactory >& rSMgr )
: ::ucbhelper::ContentProviderImplHelper( rSMgr )
{
-#if OSL_DEBUG_LEVEL > 1
- fprintf(stderr, "ContentProvider::ContentProvider( )\n" );
-#endif
}
ContentProvider::~ContentProvider()
{
-#if OSL_DEBUG_LEVEL > 1
- fprintf(stderr, "ContentProvider::~ContentProvider( )\n" );
-#endif
}
XINTERFACE_IMPL_3( ContentProvider,