equal
deleted
inserted
replaced
288 if( iProfiles[aItem]->iHostAddress ) |
288 if( iProfiles[aItem]->iHostAddress ) |
289 { |
289 { |
290 // see if address contains also port |
290 // see if address contains also port |
291 TBool portFound = EFalse; |
291 TBool portFound = EFalse; |
292 TInt startPos(0); |
292 TInt startPos(0); |
|
293 TBool isHTTPS = EFalse; |
293 if(iProfiles[aItem]->iHostAddress->Find(KNSmlDsProvisioningHTTP)==0) |
294 if(iProfiles[aItem]->iHostAddress->Find(KNSmlDsProvisioningHTTP)==0) |
294 { |
295 { |
295 startPos=KNSmlDsProvisioningHTTP().Length(); |
296 startPos=KNSmlDsProvisioningHTTP().Length(); |
296 } |
297 } |
297 else if(iProfiles[aItem]->iHostAddress->Find(KNSmlDsProvisioningHTTPS)==0) |
298 else if(iProfiles[aItem]->iHostAddress->Find(KNSmlDsProvisioningHTTPS)==0) |
298 { |
299 { |
299 startPos=KNSmlDsProvisioningHTTPS().Length(); |
300 startPos=KNSmlDsProvisioningHTTPS().Length(); |
|
301 isHTTPS = ETrue; |
300 } |
302 } |
301 TPtrC uriPtr = iProfiles[aItem]->iHostAddress->Mid(startPos); |
303 TPtrC uriPtr = iProfiles[aItem]->iHostAddress->Mid(startPos); |
302 |
304 |
303 if(uriPtr.Locate(KNSmlDMColon)!=KErrNotFound) |
305 if(uriPtr.Locate(KNSmlDMColon)!=KErrNotFound) |
304 { |
306 { |
325 } |
327 } |
326 CleanupStack::PopAndDestroy(); // uri |
328 CleanupStack::PopAndDestroy(); // uri |
327 } |
329 } |
328 else |
330 else |
329 { |
331 { |
|
332 TBuf<16> portNum; |
|
333 if (isHTTPS) |
|
334 { |
|
335 portNum.Copy(KNSmlDsHTTPSDefaultPort()); |
|
336 } |
|
337 else |
|
338 { |
|
339 portNum.Copy(KNSmlDsDefaultPort()); |
|
340 } |
330 // use default port |
341 // use default port |
331 if( CombineURILC( iProfiles[aItem]->iHostAddress->Des(), |
342 if( CombineURILC( iProfiles[aItem]->iHostAddress->Des(), |
332 KNSmlDsDefaultPort(), uri ) == KErrNone ) |
343 portNum, uri ) == KErrNone ) |
333 { |
344 { |
334 if(iProfiles[aItem]->iHostAddress) |
345 if(iProfiles[aItem]->iHostAddress) |
335 { |
346 { |
336 delete iProfiles[aItem]->iHostAddress; |
347 delete iProfiles[aItem]->iHostAddress; |
337 iProfiles[aItem]->iHostAddress = NULL; |
348 iProfiles[aItem]->iHostAddress = NULL; |