browserutilities/downloadmgr/DownloadMgrServEng/Src/HttpClientApp.cpp
changeset 1 7c90e6132015
parent 0 dd21522fd290
equal deleted inserted replaced
0:dd21522fd290 1:7c90e6132015
   205             }
   205             }
   206         }
   206         }
   207 
   207 
   208     CLOG_WRITE8_1( "New instance id: [%d]", instanceId );
   208     CLOG_WRITE8_1( "New instance id: [%d]", instanceId );
   209 
   209 
   210     // Create new connhandler used by the instance
   210     
   211     // Every instance has its own connhandler
   211     CHttpConnHandler* conn = NULL;
   212     CHttpConnHandler* conn = CHttpConnHandler::NewL( this );
   212     
   213 
   213     if(iInstances->Count() ==0 && iConnections->Count() > 0)
   214     // connhandlers are owned by CHttpClientApp.
   214         {
   215     CleanupStack::PushL( conn );
   215           conn = iConnections->At(0) ;	 
   216     iConnections->AppendL( conn );
   216         }
   217     CleanupStack::Pop( conn );
   217     else
       
   218         {
       
   219         // Create new connhandler used by the instance
       
   220         // Every instance has its own connhandler
       
   221         conn = CHttpConnHandler::NewL( this );
       
   222 
       
   223         // connhandlers are owned by CHttpClientApp.
       
   224         CleanupStack::PushL( conn );
       
   225         iConnections->AppendL( conn );
       
   226         CleanupStack::Pop( conn );
       
   227         }
       
   228     
   218 
   229 
   219     // Create new client instance
   230     // Create new client instance
   220     CHttpClientAppInstance* instance = 
   231     CHttpClientAppInstance* instance = 
   221                     CHttpClientAppInstance::NewL( this, conn, aMaster, instanceId, aObserver );
   232                     CHttpClientAppInstance::NewL( this, conn, aMaster, instanceId, aObserver );
   222 
   233