supl/locationsuplfw/protocolhandlerapi/src/epos_csuplcommunicationmanager.cpp
branchRCL_3
changeset 44 2b4ea9893b66
parent 41 d746aee05493
child 45 6b6920c56e2f
equal deleted inserted replaced
42:02ba3f1733c6 44:2b4ea9893b66
   123     CSuplConnection *suplConnection = NULL;
   123     CSuplConnection *suplConnection = NULL;
   124     
   124     
   125     if(NULL == (suplConnection = FindConnection(aHostAddress, aPort)))
   125     if(NULL == (suplConnection = FindConnection(aHostAddress, aPort)))
   126     	{
   126     	{
   127     	suplConnection = CSuplConnection::NewL(iSocketServ, aHostAddress, aPort, aIAPId, this);	
   127     	suplConnection = CSuplConnection::NewL(iSocketServ, aHostAddress, aPort, aIAPId, this);	
   128     	iConnArray.Append(suplConnection);
   128     	iConnArray.AppendL(suplConnection);
   129     	iTrace->Trace(_L("CSuplCommunicationManager::CreateConnectionL New Connection Created"), KTraceFileName, __LINE__);
   129     	iTrace->Trace(_L("CSuplCommunicationManager::CreateConnectionL New Connection Created"), KTraceFileName, __LINE__);
   130     	iConnMonitor.ConnectionOpened();
   130     	iConnMonitor.ConnectionOpened();
   131     }
   131     }
   132     else
   132     else
   133     	{
   133     	{
   137         msg.AppendNum(suplConnection->RefCount());
   137         msg.AppendNum(suplConnection->RefCount());
   138 	    iTrace->Trace(msg, KTraceFileName, __LINE__);		
   138 	    iTrace->Trace(msg, KTraceFileName, __LINE__);		
   139     	if(suplConnection->RefCount() >= KMaxSessionPerConn)
   139     	if(suplConnection->RefCount() >= KMaxSessionPerConn)
   140     		{
   140     		{
   141     		suplConnection = CSuplConnection::NewL(iSocketServ, aHostAddress, aPort, aIAPId, this);
   141     		suplConnection = CSuplConnection::NewL(iSocketServ, aHostAddress, aPort, aIAPId, this);
   142     		iConnArray.Append(suplConnection);
   142     		iConnArray.AppendL(suplConnection);
   143     		iTrace->Trace(_L("CSuplCommunicationManager::CreateConnectionL New Connection Created"), KTraceFileName, __LINE__);
   143     		iTrace->Trace(_L("CSuplCommunicationManager::CreateConnectionL New Connection Created"), KTraceFileName, __LINE__);
   144         	iConnMonitor.ConnectionOpened();
   144         	iConnMonitor.ConnectionOpened();
   145     	}
   145     	}
   146     }
   146     }
   147     
   147     
   180     CSuplConnection *suplConnection = NULL;
   180     CSuplConnection *suplConnection = NULL;
   181     
   181     
   182     if(NULL == (suplConnection = FindConnection(aHostAddress, aPort)))
   182     if(NULL == (suplConnection = FindConnection(aHostAddress, aPort)))
   183     	{
   183     	{
   184         suplConnection = CSuplConnection::NewL(iSocketServ, aHostAddress, aPort, aIAPId, aTls, aPskTls, this); 
   184         suplConnection = CSuplConnection::NewL(iSocketServ, aHostAddress, aPort, aIAPId, aTls, aPskTls, this); 
   185         iConnArray.Append(suplConnection);
   185         iConnArray.AppendL(suplConnection);
   186        	iConnMonitor.ConnectionOpened();
   186        	iConnMonitor.ConnectionOpened();
   187         iTrace->Trace(_L("CSuplCommunicationManager::CreateConnectionL New Connection Created"), KTraceFileName, __LINE__);
   187         iTrace->Trace(_L("CSuplCommunicationManager::CreateConnectionL New Connection Created"), KTraceFileName, __LINE__);
   188     	}
   188     	}
   189     else
   189     else
   190     	{
   190     	{
   194         msg.AppendNum(suplConnection->RefCount());
   194         msg.AppendNum(suplConnection->RefCount());
   195         iTrace->Trace(msg, KTraceFileName, __LINE__);       
   195         iTrace->Trace(msg, KTraceFileName, __LINE__);       
   196         if(suplConnection->RefCount() >= KMaxSessionPerConn)
   196         if(suplConnection->RefCount() >= KMaxSessionPerConn)
   197         	{
   197         	{
   198             suplConnection = CSuplConnection::NewL(iSocketServ, aHostAddress, aPort, aIAPId, aTls, aPskTls, this);
   198             suplConnection = CSuplConnection::NewL(iSocketServ, aHostAddress, aPort, aIAPId, aTls, aPskTls, this);
   199             iConnArray.Append(suplConnection);
   199             iConnArray.AppendL(suplConnection);
   200         	iConnMonitor.ConnectionOpened();
   200         	iConnMonitor.ConnectionOpened();
   201             iTrace->Trace(_L("CSuplCommunicationManager::CreateConnectionL New Connection Created"), KTraceFileName, __LINE__);
   201             iTrace->Trace(_L("CSuplCommunicationManager::CreateConnectionL New Connection Created"), KTraceFileName, __LINE__);
   202         	}
   202         	}
   203     	}
   203     	}      
   204     
   204     
   205     // Increment the Ref Count
   205     // Increment the Ref Count
   206     suplConnection->IncRefCount();
   206     suplConnection->IncRefCount();
   207         
   207         
   208     return suplConnection;  
   208     return suplConnection;