bearermanagement/S60MCPR/src/s60mcprsimpleselectactivity.cpp
changeset 73 70ee5458c95d
parent 48 69385fa96b48
--- a/bearermanagement/S60MCPR/src/s60mcprsimpleselectactivity.cpp	Wed Oct 27 18:01:02 2010 +0300
+++ b/bearermanagement/S60MCPR/src/s60mcprsimpleselectactivity.cpp	Thu Oct 28 13:13:30 2010 +0300
@@ -632,6 +632,20 @@
         TPolicyConnPref* policypref = (TPolicyConnPref*)aCompletedRequest.iPolicyPref;
 
         iNode.SetPolicyPrefs( *policypref );
+        
+        // Change APId to match SNAP if available.
+        // policypref valid, will PolicyResponse not called otherwise.
+        //
+        TUint32 snap = policypref->SnapAPId();      
+        if ( snap > 0 )
+            {
+            S60MCPRLOGSTRING2("S60MCPR<%x>::CChooseBestIAPCb::PolicyResponse() MCPR Id changed to %d",
+                    (TInt*)&iNode,snap)
+                    
+            // Change the provider info so that it can be found by parties joining to certain SNAP.                    
+            const TProviderInfo& pi = iNode.ProviderInfo();
+            iNode.SetProviderInfo( TProviderInfo( pi.TierId(), snap, &iNode ));
+            }
 
         S60MCPRLOGSTRING3("S60MCPR<%x>::CChooseBestIAPCb::PolicyResponse() IAP %d NET %d",
                   (TInt*)&iNode,policypref->IapId(),policypref->NetId())