applayerpluginsandutils/httptransportplugins/httptransporthandler/csocketconnector.cpp
equal
deleted
inserted
replaced
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"); |
111 iState = EPendingDNSLookup; |
112 iState = EPendingDNSLookup; |
112 // Address is unknown / DNS lookup is needed |
113 // Address is unknown / DNS lookup is needed |
113 error = DoPendingDNSLookup(); |
114 error = DoPendingDNSLookup(); |
114 } |
115 } |
115 else |
116 else |
116 { |
117 { |
|
118 RDebug::Printf("Remote address is known so doing a direct connect"); |
117 iState = EConnecting; |
119 iState = EConnecting; |
118 // Address is know. No lookup is needed. Just go and connect. |
120 // Address is know. No lookup is needed. Just go and connect. |
119 iHostDnsEntry().iAddr = *aRemoteAddress; |
121 iHostDnsEntry().iAddr = *aRemoteAddress; |
120 error = DoConnect(); |
122 error = DoConnect(); |
121 } |
123 } |
385 TInt error = KErrNone; |
387 TInt error = KErrNone; |
386 |
388 |
387 iCommsInfoProvider.HostResolverFromCache(iHostResolver); // Get the RHostResolver from the cache |
389 iCommsInfoProvider.HostResolverFromCache(iHostResolver); // Get the RHostResolver from the cache |
388 if(iHostResolver.SubSessionHandle() <= 0) |
390 if(iHostResolver.SubSessionHandle() <= 0) |
389 { |
391 { |
|
392 RDebug::Printf("No host resolver. Open a new one..."); |
390 if ( iCommsInfoProvider.HasConnection() ) |
393 if ( iCommsInfoProvider.HasConnection() ) |
391 { |
394 { |
392 // Open the host resolver session with the preffered connection |
395 // Open the host resolver session with the preffered connection |
393 error = iHostResolver.Open(iCommsInfoProvider.SocketServer(), |
396 error = iHostResolver.Open(iCommsInfoProvider.SocketServer(), |
394 iCommsInfoProvider.ProtocolDescription().iAddrFamily, |
397 iCommsInfoProvider.ProtocolDescription().iAddrFamily, |