vpnengine/ikesocket/src/connobserver.cpp
branchRCL_3
changeset 12 a15e6baef510
parent 0 33413c0669b9
--- a/vpnengine/ikesocket/src/connobserver.cpp	Mon Mar 15 12:44:44 2010 +0200
+++ b/vpnengine/ikesocket/src/connobserver.cpp	Wed Mar 31 23:11:34 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2008-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"
@@ -83,7 +83,7 @@
 CConnObserver::CConnObserver( RConnection& aConnection,
                               MConnObserverCallback& aCallback,
                               MIkeDebug& aDebug ) 
- :CActive(EPriorityStandard),
+ :CActive( EPriorityStandard ),
  iConnection( aConnection ),
  iCallback( aCallback ),
  iDebug( aDebug )
@@ -107,8 +107,15 @@
 //
 void CConnObserver::RunL()
     {
-    DEBUG_LOG1( _L("CConnObserver::RunL(), iStatus=%d"), iStatus.Int() );    
-    iCallback.LinkDisconnected( iStatus.Int() );
+    DEBUG_LOG2( _L("CConnObserver::RunL(), iStatus=%d, error=%d"),
+            iStatus.Int(), iProgressBuf().iError );
+    TInt status = iStatus.Int();
+    if ( status == KErrNone )
+        {
+        status = iProgressBuf().iError;
+        }
+    
+    iCallback.LinkDisconnected( status );
     }
 
 // ---------------------------------------------------------------------------