equal
deleted
inserted
replaced
121 { |
121 { |
122 MPMLOGSTRING2( "CMPMIapSelection::ChooseIapL: Set snap %i to preferences", |
122 MPMLOGSTRING2( "CMPMIapSelection::ChooseIapL: Set snap %i to preferences", |
123 snap ) |
123 snap ) |
124 iChooseIapPref.SetSnapId( snap ); |
124 iChooseIapPref.SetSnapId( snap ); |
125 iChooseIapPref.SetIapId( 0 ); |
125 iChooseIapPref.SetIapId( 0 ); |
|
126 if ( iChooseIapPref.ConnType() == TMpmConnPref::EConnTypeImplicit ) |
|
127 { |
|
128 // No Connection selection dialog on reselection. |
|
129 iChooseIapPref.SetConnType( TMpmConnPref::EConnTypeExplicit ); |
|
130 } |
126 } |
131 } |
127 else if ( iap ) |
132 else if ( iap ) |
128 { |
133 { |
129 MPMLOGSTRING2( "CMPMIapSelection::ChooseIapL: Set iap %i to preferences", |
134 MPMLOGSTRING2( "CMPMIapSelection::ChooseIapL: Set iap %i to preferences", |
130 iap ) |
135 iap ) |
131 iChooseIapPref.SetIapId( iap ); |
136 iChooseIapPref.SetIapId( iap ); |
132 iChooseIapPref.SetSnapId( 0 ); |
137 iChooseIapPref.SetSnapId( 0 ); |
|
138 if ( iChooseIapPref.ConnType() == TMpmConnPref::EConnTypeImplicit ) |
|
139 { |
|
140 // No Connection selection dialog on reselection. |
|
141 iChooseIapPref.SetConnType( TMpmConnPref::EConnTypeExplicit ); |
|
142 } |
133 } |
143 } |
134 |
144 |
135 MPMLOGSTRING3( "CMPMIapSelection::ChooseIapL: IapID: %i SnapId: %i", |
145 MPMLOGSTRING3( "CMPMIapSelection::ChooseIapL: IapID: %i SnapId: %i", |
136 iChooseIapPref.IapId(), iChooseIapPref.SnapId() ) |
146 iChooseIapPref.IapId(), iChooseIapPref.SnapId() ) |
137 |
147 |
343 // In case offline mode is enabled, only LAN or WLAN is allowed. |
353 // In case offline mode is enabled, only LAN or WLAN is allowed. |
344 // If some other bearer has been requested, then error code |
354 // If some other bearer has been requested, then error code |
345 // KErrGprsOfflineMode should be returned instead of KErrNone. |
355 // KErrGprsOfflineMode should be returned instead of KErrNone. |
346 // |
356 // |
347 |
357 |
348 if ( !iapTypeLanOrWlan && iSession->MyServer().IsPhoneOffline() ) |
358 if ( !iapTypeLanOrWlan && ( iSession->MyServer().IsPhoneOffline() || |
|
359 iSession->MyServer().RoamingWatcher()->RoamingStatus() == EMPMRoamingStatusUnknown ) ) |
349 { |
360 { |
350 ChooseIapComplete( KErrGprsOfflineMode, &iChooseIapPref ); |
361 ChooseIapComplete( KErrGprsOfflineMode, &iChooseIapPref ); |
351 } |
362 } |
352 else |
363 else |
353 { |
364 { |
469 ChooseBestIAPL( iChooseIapPref, availableIAPList, iNextBestExists ); |
480 ChooseBestIAPL( iChooseIapPref, availableIAPList, iNextBestExists ); |
470 TUint32 validateIapId = iChooseIapPref.IapId(); |
481 TUint32 validateIapId = iChooseIapPref.IapId(); |
471 // Check if any suitable IAP's were found, if not then complete selection with error code |
482 // Check if any suitable IAP's were found, if not then complete selection with error code |
472 if ( validateIapId == 0 ) |
483 if ( validateIapId == 0 ) |
473 { |
484 { |
474 if ( iChooseIapPref.ConnType() == TMpmConnPref::EConnTypeDefault ) |
485 if ( iChooseIapPref.ConnType() == TMpmConnPref::EConnTypeDefault || |
|
486 ( iChooseIapPref.ConnType() == TMpmConnPref::EConnTypeExplicit && |
|
487 !( iChooseIapPref.NoteBehaviour() & TExtendedConnPref::ENoteBehaviourConnDisableQueries ) && |
|
488 iCommsDatAccess->IsInternetSnapL( 0, snap ) ) ) |
475 { |
489 { |
476 ImplicitConnectionL(); |
490 ImplicitConnectionL(); |
477 } |
491 } |
478 else |
492 else |
479 { |
493 { |
498 |
512 |
499 if ( !CheckGprsServicesAllowedL( iapTypeLanOrWlan ) ) |
513 if ( !CheckGprsServicesAllowedL( iapTypeLanOrWlan ) ) |
500 { |
514 { |
501 ChooseIapComplete( KErrGprsServicesNotAllowed, NULL ); |
515 ChooseIapComplete( KErrGprsServicesNotAllowed, NULL ); |
502 } |
516 } |
503 else if ( !iapTypeLanOrWlan && iSession->MyServer().IsPhoneOffline() ) |
517 else if ( !iapTypeLanOrWlan && ( iSession->MyServer().IsPhoneOffline() || |
|
518 iSession->MyServer().RoamingWatcher()->RoamingStatus() == EMPMRoamingStatusUnknown ) ) |
504 { |
519 { |
505 // In case offline mode is enabled, only LAN or WLAN is allowed. |
520 // In case offline mode is enabled, only LAN or WLAN is allowed. |
506 // If some other bearer has been requested, then error code |
521 // If some other bearer has been requested, then error code |
507 // KErrGprsOfflineMode should be returned instead of KErrNone. |
522 // KErrGprsOfflineMode should be returned instead of KErrNone. |
508 // |
523 // |
919 iUserSelectionIapId, |
934 iUserSelectionIapId, |
920 retNetId, |
935 retNetId, |
921 iapTypeLanOrWlan, |
936 iapTypeLanOrWlan, |
922 *iSession ); |
937 *iSession ); |
923 |
938 |
924 if ( !iapTypeLanOrWlan && iSession->MyServer().IsPhoneOffline() ) |
939 if ( !iapTypeLanOrWlan && ( iSession->MyServer().IsPhoneOffline() || |
|
940 iSession->MyServer().RoamingWatcher()->RoamingStatus() == EMPMRoamingStatusUnknown ) ) |
925 { |
941 { |
926 MPMLOGSTRING2( "CMPMIapSelection::CompleteImplicitConnectionL: Completing with code = %i", |
942 MPMLOGSTRING2( "CMPMIapSelection::CompleteImplicitConnectionL: Completing with code = %i", |
927 KErrGprsOfflineMode ) |
943 KErrGprsOfflineMode ) |
928 ChooseIapComplete( KErrGprsOfflineMode, NULL ); |
944 ChooseIapComplete( KErrGprsOfflineMode, NULL ); |
929 } |
945 } |