bearermanagement/mpm/src/mpmserversession.cpp
changeset 56 dd6aaa97e7b1
parent 44 a0c4ceac30d0
child 61 8b0c979bbe8c
--- a/bearermanagement/mpm/src/mpmserversession.cpp	Fri Aug 06 19:11:03 2010 +0300
+++ b/bearermanagement/mpm/src/mpmserversession.cpp	Mon Aug 23 13:40:12 2010 +0300
@@ -913,7 +913,10 @@
         //Display confirm dialog only if we are moving to cellular IAP
         if ( MyServer().CommsDatAccess()->CheckWlanL( iMigrateIap ) == ENotWlanIap )
             {
-            if ( !( iIapSelection->MpmConnPref().NoteBehaviour() & TExtendedConnPref::ENoteBehaviourConnDisableQueries ) )
+            // Check that connection preferences don't deny queries, and
+            // enough time has elapsed from the last query cancelled by the user.
+            if ( !( iIapSelection->MpmConnPref().NoteBehaviour() & TExtendedConnPref::ENoteBehaviourConnDisableQueries ) &&
+                 !MyServer().IsConnPermQueryTimerOn() )
                 {
                 if ( MyServer().RoamingWatcher()->RoamingStatus() == EMPMInternationalRoaming )
                     {
@@ -1015,6 +1018,10 @@
         {
         if( aResponse == EMsgQueryCancelled )
             {
+            // User cancelled the connection permission query,
+            // don't try again until the timer expires.
+            MyServer().StartConnPermQueryTimer();
+            
             if( !aReconnect )
                 {
                 // Send a preferred IAP notification