vpnengine/vpnconnagt/src/vpnsipobserver.cpp
branchRCL_3
changeset 18 74294b43d401
parent 8 032d3a818f49
--- a/vpnengine/vpnconnagt/src/vpnsipobserver.cpp	Tue May 25 13:48:10 2010 +0300
+++ b/vpnengine/vpnconnagt/src/vpnsipobserver.cpp	Wed Jun 09 10:48:33 2010 +0300
@@ -108,23 +108,24 @@
 //             
 void CVpnSipObserver::RunL()
     {
+    LOG_1( "CVpnSipObserver::RunL iStatus = %d", iStatus.Int());
     if ( iStatus == KErrNone ) 
         {
         TInt val = 0;
         // SIP Profile Server notified completion of SIP deregistration.
-        TInt err = iSIPProperty.Get( KPSVpnSipUid, KVpnSipState, val );
-        
-        if ( err == KErrNone )
+        TInt err = iSIPProperty.Get( KPSVpnSipUid, KVpnSipState, val );        
+        if ( err == KErrNone && val == ESipDeregisterCompleted )
             {
             // If SIP is deregistered, let the VPN Connection Agent to 
             // proceed VPN session start.
-            if ( val == ESipDeregisterCompleted )
-                {
-                iAgent.ProceedServiceStart();
-                }
+            LOG_( "CVpnSipObserver::RunL SIP is deregistered. VPN Connection Agent continue with VPN start." );
+            iAgent.ProceedServiceStart();            
             }
-        // Keep monitoring.
-        Subscribe();
+        else
+            {
+            // Keep monitoring.
+            Subscribe();
+            }
         }
     // Check if observer can be restarted.
     else if ( iStatus != KErrCancel