diff -r 77415202bfc8 -r fcbbe021d614 bearermanagement/S60MCPR/src/s60mcprsimpleselectactivity.cpp --- a/bearermanagement/S60MCPR/src/s60mcprsimpleselectactivity.cpp Tue Feb 02 00:24:11 2010 +0200 +++ b/bearermanagement/S60MCPR/src/s60mcprsimpleselectactivity.cpp Fri Apr 16 15:21:37 2010 +0300 @@ -155,12 +155,11 @@ TSelectionPrefs prefs; - ESock::RConnPrefList::TIter iterCSR = node.ConnPrefList().getIter(); - //There should be one and only one CSR pref - ASSERT(iterCSR[0] != NULL && iterCSR[1] == NULL); - TConnCSRPref* csrprefs = iterCSR[0]; - - prefs.SetSubSessionUniqueId(csrprefs->SubSessionUniqueId()); + ESock::RConnPrefList::TIter iterCSR = node.ConnPrefList().getIter(); + //There should be one and only one CSR pref + ASSERT(iterCSR[0] != NULL && iterCSR[1] == NULL); + TConnCSRPref* csrprefs = iterCSR[0]; + prefs.SetSubSessionUniqueId(node.SubSessionUniqueId()); prefs.SetFlags(csrprefs->Flags()); prefs.SetScope(csrprefs->Scope()); @@ -172,7 +171,6 @@ node.ConnPrefList().AppendL(nextAP); CleanupStack::Pop(); /* END OF HACK */ - // Attach. 399 attach shouldn't be visible here. if ( prefs.Scope()&TSelectionPrefs::ESelectFromExisting ) @@ -185,6 +183,7 @@ else { S60MCPRLOGSTRING1("S60MCPR<%x>::TSelectNextLayer::DoL() Start",(TInt*)&iContext.Node()) + TCommDbConnPref ippprefs; ippprefs.SetIapId( node.PolicyPrefs().IapId() ); ippprefs.SetNetId( node.PolicyPrefs().NetId() ); @@ -195,10 +194,6 @@ newPrefs.SetPrefs( ippprefs ); TCFSelector::TSimpleSelect msg(newPrefs); iContext.iNodeActivity->PostRequestTo(ac.iTierManager, msg); - - //TODO Clarify, if the SelectionChoices is actually needed... - //if (ac.SelectionChoices().Count() == 0) - //ac.SelectionChoices().Append(node.iIAPList[0]); } } } @@ -296,11 +291,15 @@ } #endif //_DEBUG + TSelectionPrefs newPrefs; + newPrefs = node.SelectionPrefs(); + newPrefs.SetSubSessionUniqueId( node.SubSessionUniqueId() ); + // Attach. 399 attach shouldn't be visible here. if ( node.SelectionPrefs().Scope()&TSelectionPrefs::ESelectFromExisting ) { S60MCPRLOGSTRING1("S60MCPR<%x>::TSelectNextLayer::DoL() Attach ",(TInt*)&iContext.Node()) - TCFSelector::TSimpleSelect msg( node.SelectionPrefs() ); + TCFSelector::TSimpleSelect msg( newPrefs ); iContext.iNodeActivity->PostRequestTo( ac.iTierManager, msg ); } // Start @@ -312,15 +311,9 @@ ippprefs.SetNetId( node.PolicyPrefs().NetId() ); //node.MapPolicyPrefsToConnPrefL( node.PolicyPrefs(), tmppref ); // don't use reference we want to preserve the original TSelectionPrefs. - TSelectionPrefs newPrefs; - newPrefs = node.SelectionPrefs(); newPrefs.SetPrefs( ippprefs ); TCFSelector::TSimpleSelect msg(newPrefs); iContext.iNodeActivity->PostRequestTo(ac.iTierManager, msg); - - //TODO Clarify, if the SelectionChoices is actually needed... - //if (ac.SelectionChoices().Count() == 0) - //ac.SelectionChoices().Append(node.iIAPList[0]); } } @@ -349,16 +342,7 @@ CleanupStack::PushL( cb ); // Resolve application uid. - TSubSessionUniqueId subSessionUniqueId = node.SelectionPrefs().SubSessionUniqueId(); - - if ( !node.ConnPrefList().Count() ) - { - subSessionUniqueId = node.SelectionPrefs().SubSessionUniqueId(); - } - else - { - subSessionUniqueId = node.SubSessionUniqueId(); - } + TSubSessionUniqueId subSessionUniqueId = node.SubSessionUniqueId(); TSecureId secureId( 0 );