User: rt      
Date: 2007-07-24 11:49:58+0000
Modified:
   dba/connectivity/source/cpool/ZPoolCollection.cxx

Log:
 INTEGRATION: CWS dba23b (1.11.100); FILE MERGED
 2007/07/06 07:38:33 oj 1.11.100.1: #i79217# apply patch

File Changes:

Directory: /dba/connectivity/source/cpool/
==========================================

File [changed]: ZPoolCollection.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/connectivity/source/cpool/ZPoolCollection.cxx?r1=1.11&r2=1.12
Delta lines:  +7 -3
-------------------
--- ZPoolCollection.cxx 2006-09-17 02:04:31+0000        1.11
+++ ZPoolCollection.cxx 2007-07-24 11:49:56+0000        1.12
@@ -353,8 +353,11 @@
                                                                                
                        const Reference< XDriver >& _xDriver,
                                                                                
                        const Reference< XInterface >& _xDriverNode)
 {
+       OConnectionPool *pRet = 0;
        OConnectionPools::const_iterator aFind = m_aPools.find(_sImplName);
-       if(aFind == m_aPools.end() && _xDriver.is() && _xDriverNode.is())
+       if (aFind != m_aPools.end())
+               pRet = aFind->second;
+       else if (_xDriver.is() && _xDriverNode.is())
        {
                Reference<XPropertySet> xProp(_xDriverNode,UNO_QUERY);
                if(xProp.is())
@@ -362,11 +365,12 @@
                OConnectionPool* pConnectionPool = new 
OConnectionPool(_xDriver,_xDriverNode,m_xProxyFactory);
                pConnectionPool->acquire();
                aFind = 
m_aPools.insert(OConnectionPools::value_type(_sImplName,pConnectionPool)).first;
+               pRet = aFind->second;
        }
 
-       OSL_ENSURE(aFind->second,"Could not query DriverManager from 
ConnectionPool!");
+       OSL_ENSURE(pRet, "Could not query DriverManager from ConnectionPool!");
 
-       return aFind->second;
+       return pRet;
 }
 // 
-----------------------------------------------------------------------------
 Reference< XInterface > OPoolCollection::createWithServiceFactory(const 
::rtl::OUString& _rPath) const




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to