equal
deleted
inserted
replaced
153 } |
153 } |
154 #endif //_DEBUG |
154 #endif //_DEBUG |
155 |
155 |
156 TSelectionPrefs prefs; |
156 TSelectionPrefs prefs; |
157 |
157 |
158 ESock::RConnPrefList::TIter<TConnCSRPref> iterCSR = node.ConnPrefList().getIter<TConnCSRPref>(); |
158 ESock::RConnPrefList::TIter<TConnCSRPref> iterCSR = node.ConnPrefList().getIter<TConnCSRPref>(); |
159 //There should be one and only one CSR pref |
159 //There should be one and only one CSR pref |
160 ASSERT(iterCSR[0] != NULL && iterCSR[1] == NULL); |
160 ASSERT(iterCSR[0] != NULL && iterCSR[1] == NULL); |
161 TConnCSRPref* csrprefs = iterCSR[0]; |
161 TConnCSRPref* csrprefs = iterCSR[0]; |
162 |
162 prefs.SetSubSessionUniqueId(node.SubSessionUniqueId()); |
163 prefs.SetSubSessionUniqueId(csrprefs->SubSessionUniqueId()); |
|
164 prefs.SetFlags(csrprefs->Flags()); |
163 prefs.SetFlags(csrprefs->Flags()); |
165 prefs.SetScope(csrprefs->Scope()); |
164 prefs.SetScope(csrprefs->Scope()); |
166 |
165 |
167 /*** HACK ALERT! |
166 /*** HACK ALERT! |
168 |
167 |
170 TConnAPPref* nextAP = TConnAPPref::NewL(node.PolicyPrefs().IapId()); |
169 TConnAPPref* nextAP = TConnAPPref::NewL(node.PolicyPrefs().IapId()); |
171 CleanupStack::PushL(nextAP); |
170 CleanupStack::PushL(nextAP); |
172 node.ConnPrefList().AppendL(nextAP); |
171 node.ConnPrefList().AppendL(nextAP); |
173 CleanupStack::Pop(); |
172 CleanupStack::Pop(); |
174 /* END OF HACK */ |
173 /* END OF HACK */ |
175 |
|
176 |
174 |
177 // Attach. 399 attach shouldn't be visible here. |
175 // Attach. 399 attach shouldn't be visible here. |
178 if ( prefs.Scope()&TSelectionPrefs::ESelectFromExisting ) |
176 if ( prefs.Scope()&TSelectionPrefs::ESelectFromExisting ) |
179 { |
177 { |
180 S60MCPRLOGSTRING1("S60MCPR<%x>::TSelectNextLayer::DoL() Attach ",(TInt*)&iContext.Node()) |
178 S60MCPRLOGSTRING1("S60MCPR<%x>::TSelectNextLayer::DoL() Attach ",(TInt*)&iContext.Node()) |
183 } |
181 } |
184 // Start |
182 // Start |
185 else |
183 else |
186 { |
184 { |
187 S60MCPRLOGSTRING1("S60MCPR<%x>::TSelectNextLayer::DoL() Start",(TInt*)&iContext.Node()) |
185 S60MCPRLOGSTRING1("S60MCPR<%x>::TSelectNextLayer::DoL() Start",(TInt*)&iContext.Node()) |
|
186 |
188 TCommDbConnPref ippprefs; |
187 TCommDbConnPref ippprefs; |
189 ippprefs.SetIapId( node.PolicyPrefs().IapId() ); |
188 ippprefs.SetIapId( node.PolicyPrefs().IapId() ); |
190 ippprefs.SetNetId( node.PolicyPrefs().NetId() ); |
189 ippprefs.SetNetId( node.PolicyPrefs().NetId() ); |
191 //node.MapPolicyPrefsToConnPrefL( node.PolicyPrefs(), tmppref ); |
190 //node.MapPolicyPrefsToConnPrefL( node.PolicyPrefs(), tmppref ); |
192 // don't use reference we want to preserve the original TSelectionPrefs. |
191 // don't use reference we want to preserve the original TSelectionPrefs. |
294 S60MCPRLOGSTRING1("S60MCPR<%x>::TSelectNextLayer::DoL() SNAP Attach problem!!!!",(TInt*)&iContext.Node()) |
293 S60MCPRLOGSTRING1("S60MCPR<%x>::TSelectNextLayer::DoL() SNAP Attach problem!!!!",(TInt*)&iContext.Node()) |
295 __ASSERT_DEBUG(EFalse, User::Panic(KS60MCprPanic, KPanicUnsupportedMCPRState)); |
294 __ASSERT_DEBUG(EFalse, User::Panic(KS60MCprPanic, KPanicUnsupportedMCPRState)); |
296 } |
295 } |
297 #endif //_DEBUG |
296 #endif //_DEBUG |
298 |
297 |
|
298 TSelectionPrefs newPrefs; |
|
299 newPrefs = node.SelectionPrefs(); |
|
300 newPrefs.SetSubSessionUniqueId( node.SubSessionUniqueId() ); |
|
301 |
299 // Attach. 399 attach shouldn't be visible here. |
302 // Attach. 399 attach shouldn't be visible here. |
300 if ( node.SelectionPrefs().Scope()&TSelectionPrefs::ESelectFromExisting ) |
303 if ( node.SelectionPrefs().Scope()&TSelectionPrefs::ESelectFromExisting ) |
301 { |
304 { |
302 S60MCPRLOGSTRING1("S60MCPR<%x>::TSelectNextLayer::DoL() Attach ",(TInt*)&iContext.Node()) |
305 S60MCPRLOGSTRING1("S60MCPR<%x>::TSelectNextLayer::DoL() Attach ",(TInt*)&iContext.Node()) |
303 TCFSelector::TSimpleSelect msg( node.SelectionPrefs() ); |
306 TCFSelector::TSimpleSelect msg( newPrefs ); |
304 iContext.iNodeActivity->PostRequestTo( ac.iTierManager, msg ); |
307 iContext.iNodeActivity->PostRequestTo( ac.iTierManager, msg ); |
305 } |
308 } |
306 // Start |
309 // Start |
307 else |
310 else |
308 { |
311 { |
310 TCommDbConnPref ippprefs; |
313 TCommDbConnPref ippprefs; |
311 ippprefs.SetIapId( node.PolicyPrefs().IapId() ); |
314 ippprefs.SetIapId( node.PolicyPrefs().IapId() ); |
312 ippprefs.SetNetId( node.PolicyPrefs().NetId() ); |
315 ippprefs.SetNetId( node.PolicyPrefs().NetId() ); |
313 //node.MapPolicyPrefsToConnPrefL( node.PolicyPrefs(), tmppref ); |
316 //node.MapPolicyPrefsToConnPrefL( node.PolicyPrefs(), tmppref ); |
314 // don't use reference we want to preserve the original TSelectionPrefs. |
317 // don't use reference we want to preserve the original TSelectionPrefs. |
315 TSelectionPrefs newPrefs; |
|
316 newPrefs = node.SelectionPrefs(); |
|
317 newPrefs.SetPrefs( ippprefs ); |
318 newPrefs.SetPrefs( ippprefs ); |
318 TCFSelector::TSimpleSelect msg(newPrefs); |
319 TCFSelector::TSimpleSelect msg(newPrefs); |
319 iContext.iNodeActivity->PostRequestTo(ac.iTierManager, msg); |
320 iContext.iNodeActivity->PostRequestTo(ac.iTierManager, msg); |
320 |
321 |
321 //TODO Clarify, if the SelectionChoices is actually needed... |
322 //TODO Clarify, if the SelectionChoices is actually needed... |
347 CChooseBestIAPCb* cb = new( ELeave ) CChooseBestIAPCb( node, iContext.iNodeActivity ); |
348 CChooseBestIAPCb* cb = new( ELeave ) CChooseBestIAPCb( node, iContext.iNodeActivity ); |
348 |
349 |
349 CleanupStack::PushL( cb ); |
350 CleanupStack::PushL( cb ); |
350 |
351 |
351 // Resolve application uid. |
352 // Resolve application uid. |
352 TSubSessionUniqueId subSessionUniqueId = node.SelectionPrefs().SubSessionUniqueId(); |
353 TSubSessionUniqueId subSessionUniqueId = node.SubSessionUniqueId(); |
353 |
|
354 if ( !node.ConnPrefList().Count() ) |
|
355 { |
|
356 subSessionUniqueId = node.SelectionPrefs().SubSessionUniqueId(); |
|
357 } |
|
358 else |
|
359 { |
|
360 subSessionUniqueId = node.SubSessionUniqueId(); |
|
361 } |
|
362 |
354 |
363 TSecureId secureId( 0 ); |
355 TSecureId secureId( 0 ); |
364 |
356 |
365 // Note that we use Symbian internal API to resolve the uid. |
357 // Note that we use Symbian internal API to resolve the uid. |
366 AIPCClientInfo clientinfo; |
358 AIPCClientInfo clientinfo; |