--- a/mtpfws/mtpfw/src/cmtpdataprovider.cpp Thu May 27 13:42:43 2010 +0300
+++ b/mtpfws/mtpfw/src/cmtpdataprovider.cpp Fri Jun 11 14:27:06 2010 +0300
@@ -556,7 +556,10 @@
}
else
{
- iCurrentTransactionPhase = iCurrentConnection->TransactionPhaseL(iCurrentRequest->Uint32(TMTPTypeRequest::ERequestSessionID));
+ if (iCurrentRequest != NULL)
+ {
+ iCurrentTransactionPhase = iCurrentConnection->TransactionPhaseL(iCurrentRequest->Uint32(TMTPTypeRequest::ERequestSessionID));
+ }
}
__FLOG_VA((_L8("Current transaction phase = 0x%08X"), iCurrentTransactionPhase));
@@ -616,7 +619,8 @@
else if (iSingletons.DpController().EnumerateState() < CMTPDataProviderController::EEnumeratingPhaseOneDone)
{
__FLOG(_L8("DP Enumeration is not complete"));
-
+ if (iCurrentRequest != NULL)
+ {
TUint16 opCode = iCurrentRequest->Uint16(TMTPTypeRequest::ERequestOperationCode);
switch(opCode)
@@ -669,6 +673,7 @@
default:
break;
}
+ }
}
}
else
@@ -678,16 +683,19 @@
//Make ActiveRequest processor and CancelRequest processing to occur synchronously
if( iCurrentTransactionPhase == ERequestPhase )
- {
- CMTPSession& session(static_cast<CMTPSession&>(iCurrentConnection->SessionWithMTPIdL(iCurrentRequest->Uint32(TMTPTypeRequest::ERequestSessionID))));
- MMTPConnectionProtocol& connection(static_cast<MMTPConnectionProtocol&>(*iCurrentConnection));
+ {
+ if( iCurrentRequest != NULL )
+ {
+ CMTPSession& session(static_cast<CMTPSession&>(iCurrentConnection->SessionWithMTPIdL(iCurrentRequest->Uint32(TMTPTypeRequest::ERequestSessionID))));
+ MMTPConnectionProtocol& connection(static_cast<MMTPConnectionProtocol&>(*iCurrentConnection));
- // Pass transaction to session to check against any pending events
- if ( session.CheckPendingEvent(*iCurrentRequest) )
- {
- //Current request matches a pending event, pass event to connection layer event processing
- connection.ReceivedEventL(session.PendingEvent());
- }
+ // Pass transaction to session to check against any pending events
+ if ( session.CheckPendingEvent(*iCurrentRequest) )
+ {
+ //Current request matches a pending event, pass event to connection layer event processing
+ connection.ReceivedEventL(session.PendingEvent());
+ }
+ }
}
}