--- a/bearermanagement/S60MCPR/src/s60mpmrequests.cpp Tue Jul 06 14:42:41 2010 +0300
+++ b/bearermanagement/S60MCPR/src/s60mpmrequests.cpp Wed Aug 18 10:10:23 2010 +0300
@@ -847,10 +847,15 @@
// Asynchronous cancellation adds message to MPMServer's IPC queue but since we
// queue all requests we can safely always call the SendCancelRequest()
+ // Sanity check.
+ S60MCPRLOGSTRING2( "S60MCPR::CMPMPolicyRequests<%x>::CancelRequest() %d", this, (TInt)aRequestCode )
+ if ( iPolicyRequests.Count() == 0 )
+ {
+ S60MCPRLOGSTRING1( "S60MCPR::CMPMPolicyRequests<%x>::CancelRequest(): Error: Nothing to cancel!", this )
+ return;
+ }
// If the cancelled request is the active one.
- //
- S60MCPRLOGSTRING2( "S60MCPR::CMPMPolicyRequests<%x>::CancelRequest() %d", this, (TInt)aRequestCode )
- if ( iPolicyRequests[0].iRequestType == aRequestCode )
+ else if ( iPolicyRequests[0].iRequestType == aRequestCode )
{
// Cancel the query if active
//
@@ -877,7 +882,6 @@
}
}
// Else we need to find it from the queue
- //
else
{
S60MCPRLOGSTRING1( "S60MCPR::CMPMPolicyRequests<%x>::CancelRequest() Cancelling pending request", this )