--- a/bearermanagement/mpm/src/mpmdisconnectdlg.cpp Thu Jul 15 19:05:04 2010 +0300
+++ b/bearermanagement/mpm/src/mpmdisconnectdlg.cpp Thu Aug 19 10:18:49 2010 +0300
@@ -118,9 +118,18 @@
MPMLOGSTRING( "CMPMDisconnectDlg::UserSelectedOk: \
Tell BM to ignore error and do reselection" )
- TBMNeededAction neededAction( EDoReselection );
TInt error = aError;
+ // Get the current connection IapId for this connId
+ TUint32 iapId = iSession.MyServer().GetBMIap( iSession.ConnectionId() );
+
+ TBMNeededAction neededActionForPendingMsgs( EIgnoreError );
+ iSession.MyServer().HandlePendingMsgs( iapId,
+ KErrNone,
+ &error,
+ &neededActionForPendingMsgs );
+
+ TBMNeededAction neededAction( EDoReselection );
iSession.ProcessErrorComplete( KErrNone,
&error,
&neededAction );
@@ -157,6 +166,10 @@
TConnectionState state;
iSession.MyServer().GetConnectionState( connId, state );
+ // Get the current connection IapId for this connId
+ //
+ TUint32 currentIap = iSession.MyServer().GetBMIap( connId );
+
if ( state == EStarting )
{
MPMLOGSTRING2( "CMPMDisconnectDlg::UserSelectedCancelL: \
@@ -173,10 +186,6 @@
iSession.StoredIapInfo().ResetStoredIapInfo();
neededAction = EIgnoreError;
- // Get the current connection IapId for this connId
- //
- TUint32 currentIap = iSession.MyServer().GetBMIap( connId );
-
TConnMonIapInfo availableIAPs;
availableIAPs = iSession.GetAvailableIAPs();
@@ -208,6 +217,11 @@
Unsupported state %d", state )
}
+ iSession.MyServer().HandlePendingMsgs( currentIap,
+ KErrNone,
+ errorPtr,
+ &neededAction );
+
iSession.ProcessErrorComplete( KErrNone,
errorPtr,
&neededAction );
@@ -229,8 +243,13 @@
"CMPMDisconnectDlg::RunError: RunL made a leave with error = %i",
aError )
+ // Get the current connection IapId for this connId
+ TUint32 iapId = iSession.MyServer().GetBMIap( iSession.ConnectionId() );
+
+ iSession.MyServer().HandlePendingMsgs( iapId, aError, NULL, NULL );
+
iSession.ProcessErrorComplete( aError, NULL, NULL );
-
+
// Return KErrNone to prevent panic
//
return KErrNone;