Revision: 201021
authorDremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Fri, 11 Jun 2010 14:38:23 +0300
changeset 27 19c70b65c876
parent 24 8447e6f7e2f5
child 33 23c5d20fa49f
Revision: 201021 Kit: 2010123
group/bld.inf
layers.sysdef.xml
vpnapiimpl/group/bld.inf
vpnengine/vpnconnagt/src/vpnconnagt.cpp
vpnengine/vpnconnagt/src/vpnsipobserver.cpp
--- a/group/bld.inf	Thu May 27 13:53:35 2010 +0300
+++ b/group/bld.inf	Fri Jun 11 14:38:23 2010 +0300
@@ -57,9 +57,6 @@
 ../vpnui/vpnpolicyrecognizer/rom/vpnpolicyrecognizer.iby               CORE_MW_LAYER_IBY_EXPORT_PATH(vpnpolicyrecognizer.iby)
 ../rom/ipsecvpn.iby                                                    CORE_MW_LAYER_IBY_EXPORT_PATH(ipsecvpn.iby)
 
-// vpnapi.dll should be in rom always
-../vpnapiimpl/rom/vpnapi.iby                                           CORE_MW_LAYER_IBY_EXPORT_PATH(vpnapi.iby)
-
 // export localised loc file
 ../vpnui/vpnecomnotifier/loc/vpnnotifier.loc                           MW_LAYER_LOC_EXPORT_PATH(vpnnotifier.loc)
 
--- a/layers.sysdef.xml	Thu May 27 13:53:35 2010 +0300
+++ b/layers.sysdef.xml	Fri Jun 11 14:38:23 2010 +0300
@@ -7,8 +7,8 @@
   <systemModel>
     <layer name="mw_layer">
       <module name="vpnclient"> 
-     	<unit unitID="netdo.vpnclient"
-       mrp="" bldFile="&layer_real_source_path;/group" name="vpnclient" />
+     	<unit unitID="netdo.vpnapiimpl" mrp="" bldFile="&layer_real_source_path;/vpnapiimpl/group" name="vpnapiimpl" />
+      <unit unitID="netdo.vpnapi" mrp="" bldFile="&layer_real_source_path;/vpnc_plat/vpnapi/group" name="vpnapi" />
      </module>
     </layer>
   </systemModel>
--- a/vpnapiimpl/group/bld.inf	Thu May 27 13:53:35 2010 +0300
+++ b/vpnapiimpl/group/bld.inf	Fri Jun 11 14:38:23 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -18,5 +18,9 @@
 
 #include <platform_paths.hrh>
 
+PRJ_EXPORTS
+// vpnapi.dll should be in rom always
+../rom/vpnapi.iby                                           CORE_MW_LAYER_IBY_EXPORT_PATH(vpnapi.iby)
+
 PRJ_MMPFILES 
 vpnapi.mmp
--- a/vpnengine/vpnconnagt/src/vpnconnagt.cpp	Thu May 27 13:53:35 2010 +0300
+++ b/vpnengine/vpnconnagt/src/vpnconnagt.cpp	Fri Jun 11 14:38:23 2010 +0300
@@ -127,6 +127,7 @@
 //
 inline void CVPNConnAgt::ConstructL()
     {
+    
     LOG_1("[0x%08x] Constructing VPN Connection Agent\n", this);
     // construct the database and dialog processor
     CAgentBase::ConstructL();
@@ -332,8 +333,10 @@
     if ( FeatureManager::FeatureSupported( KFeatureIdFfImsDeregistrationInVpn ) )
         {
         // For some reason, if the request fails, just proceeds.
-        if ( iSipObserver->RequestDeregister() != KErrNone )
+        TInt err = iSipObserver->RequestDeregister();
+        if ( err != KErrNone )
             {
+            LOG_1( "CVPNConnAgt::ServiceStarted:  iSipObserver->RequestDeregister failed with %d", err );
             ProceedServiceStart();
             }
         // Return for now. ProceedServiceStart() will be called later by iSipObserver when
@@ -473,7 +476,11 @@
         {
         // SIP is re-registered when a VPN session ends.
         // Note: return value ignored. Nothing to do here for error cases.
-        iSipObserver->RequestRegister();
+        TInt err = iSipObserver->RequestRegister();
+        if (err != KErrNone)
+            {
+            LOG(Log::Printf(_L("SipObserver->RequestRegister failed with %d\n"), err));
+            }
         }
 
     iNotify->AgentProgress(EVPNConnAgtDisconnected, KErrNone);
@@ -572,7 +579,11 @@
                 {
                 // SIP is re-registered when a VPN session ends.
                 // Note: return value ignored. Nothing to do here for error cases.
-                iSipObserver->RequestRegister();
+                TInt err = iSipObserver->RequestRegister();
+                if (err != KErrNone)
+                    {
+                    LOG(Log::Printf(_L("SipObserver->RequestRegister failed with %d\n"), err));
+                    }
                 }    
             
             closeData = (TCloseVpnConnEventData*)(aData->Ptr());
--- a/vpnengine/vpnconnagt/src/vpnsipobserver.cpp	Thu May 27 13:53:35 2010 +0300
+++ b/vpnengine/vpnconnagt/src/vpnsipobserver.cpp	Fri Jun 11 14:38:23 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