applayerpluginsandutils/httptransportplugins/httptransporthandler/csocketconnector.cpp
branchRCL_3
changeset 40 a0da872af3fa
parent 39 c0c2f28ace9c
equal deleted inserted replaced
39:c0c2f28ace9c 40:a0da872af3fa
   106 		
   106 		
   107 	TInt error = KErrNone;
   107 	TInt error = KErrNone;
   108     // Move to the PendingDNSLookup state and self complete.
   108     // Move to the PendingDNSLookup state and self complete.
   109     if(aRemoteAddress == NULL)
   109     if(aRemoteAddress == NULL)
   110         {
   110         {
   111         RDebug::Printf("RemoteAddress is NULL so doing a DNS lookup");
       
   112         iState = EPendingDNSLookup;
   111         iState = EPendingDNSLookup;
   113         // Address is unknown / DNS lookup is needed
   112         // Address is unknown / DNS lookup is needed
   114         error = DoPendingDNSLookup();
   113         error = DoPendingDNSLookup();
   115         }
   114         }
   116     else
   115     else
   117         {
   116         {
   118         RDebug::Printf("Remote address is known so doing a direct connect");
       
   119         iState = EConnecting;
   117         iState = EConnecting;
   120         // Address is know. No lookup is needed. Just go and connect.
   118         // Address is know. No lookup is needed. Just go and connect.
   121         iHostDnsEntry().iAddr = *aRemoteAddress;
   119         iHostDnsEntry().iAddr = *aRemoteAddress;
   122         error = DoConnect();
   120         error = DoConnect();
   123         }
   121         }
   387      TInt error = KErrNone;
   385      TInt error = KErrNone;
   388      
   386      
   389      iCommsInfoProvider.HostResolverFromCache(iHostResolver); // Get the RHostResolver from the cache
   387      iCommsInfoProvider.HostResolverFromCache(iHostResolver); // Get the RHostResolver from the cache
   390      if(iHostResolver.SubSessionHandle() <= 0)
   388      if(iHostResolver.SubSessionHandle() <= 0)
   391          {
   389          {
   392          RDebug::Printf("No host resolver. Open a new one...");
       
   393          if ( iCommsInfoProvider.HasConnection() )
   390          if ( iCommsInfoProvider.HasConnection() )
   394             {
   391             {
   395             // Open the host resolver session with the preffered connection
   392             // Open the host resolver session with the preffered connection
   396             error = iHostResolver.Open(iCommsInfoProvider.SocketServer(),
   393             error = iHostResolver.Open(iCommsInfoProvider.SocketServer(),
   397                                        iCommsInfoProvider.ProtocolDescription().iAddrFamily, 
   394                                        iCommsInfoProvider.ProtocolDescription().iAddrFamily,