554 { |
554 { |
555 iCurrentTransactionPhase = iProxyTransactionPhase; |
555 iCurrentTransactionPhase = iProxyTransactionPhase; |
556 } |
556 } |
557 else |
557 else |
558 { |
558 { |
559 iCurrentTransactionPhase = iCurrentConnection->TransactionPhaseL(iCurrentRequest->Uint32(TMTPTypeRequest::ERequestSessionID)); |
559 if (iCurrentRequest != NULL) |
|
560 { |
|
561 iCurrentTransactionPhase = iCurrentConnection->TransactionPhaseL(iCurrentRequest->Uint32(TMTPTypeRequest::ERequestSessionID)); |
|
562 } |
560 } |
563 } |
561 __FLOG_VA((_L8("Current transaction phase = 0x%08X"), iCurrentTransactionPhase)); |
564 __FLOG_VA((_L8("Current transaction phase = 0x%08X"), iCurrentTransactionPhase)); |
562 |
565 |
563 TInt status(iStatus.Int()); |
566 TInt status(iStatus.Int()); |
564 if ((status != KErrNone) && |
567 if ((status != KErrNone) && |
614 } |
617 } |
615 |
618 |
616 else if (iSingletons.DpController().EnumerateState() < CMTPDataProviderController::EEnumeratingPhaseOneDone) |
619 else if (iSingletons.DpController().EnumerateState() < CMTPDataProviderController::EEnumeratingPhaseOneDone) |
617 { |
620 { |
618 __FLOG(_L8("DP Enumeration is not complete")); |
621 __FLOG(_L8("DP Enumeration is not complete")); |
619 |
622 if (iCurrentRequest != NULL) |
|
623 { |
620 TUint16 opCode = iCurrentRequest->Uint16(TMTPTypeRequest::ERequestOperationCode); |
624 TUint16 opCode = iCurrentRequest->Uint16(TMTPTypeRequest::ERequestOperationCode); |
621 |
625 |
622 switch(opCode) |
626 switch(opCode) |
623 { |
627 { |
624 case EMTPOpCodeOpenSession: |
628 case EMTPOpCodeOpenSession: |
667 iImplementation->ProcessRequestPhaseL(iCurrentTransactionPhase, *iCurrentRequest, *iCurrentConnection); |
671 iImplementation->ProcessRequestPhaseL(iCurrentTransactionPhase, *iCurrentRequest, *iCurrentConnection); |
668 break; |
672 break; |
669 default: |
673 default: |
670 break; |
674 break; |
671 } |
675 } |
|
676 } |
672 } |
677 } |
673 } |
678 } |
674 else |
679 else |
675 { |
680 { |
676 // Pass to the bound plugin for processing. |
681 // Pass to the bound plugin for processing. |
677 iImplementation->ProcessRequestPhaseL(iCurrentTransactionPhase, *iCurrentRequest, *iCurrentConnection); |
682 iImplementation->ProcessRequestPhaseL(iCurrentTransactionPhase, *iCurrentRequest, *iCurrentConnection); |
678 |
683 |
679 //Make ActiveRequest processor and CancelRequest processing to occur synchronously |
684 //Make ActiveRequest processor and CancelRequest processing to occur synchronously |
680 if( iCurrentTransactionPhase == ERequestPhase ) |
685 if( iCurrentTransactionPhase == ERequestPhase ) |
681 { |
686 { |
682 CMTPSession& session(static_cast<CMTPSession&>(iCurrentConnection->SessionWithMTPIdL(iCurrentRequest->Uint32(TMTPTypeRequest::ERequestSessionID)))); |
687 if( iCurrentRequest != NULL ) |
683 MMTPConnectionProtocol& connection(static_cast<MMTPConnectionProtocol&>(*iCurrentConnection)); |
688 { |
|
689 CMTPSession& session(static_cast<CMTPSession&>(iCurrentConnection->SessionWithMTPIdL(iCurrentRequest->Uint32(TMTPTypeRequest::ERequestSessionID)))); |
|
690 MMTPConnectionProtocol& connection(static_cast<MMTPConnectionProtocol&>(*iCurrentConnection)); |
684 |
691 |
685 // Pass transaction to session to check against any pending events |
692 // Pass transaction to session to check against any pending events |
686 if ( session.CheckPendingEvent(*iCurrentRequest) ) |
693 if ( session.CheckPendingEvent(*iCurrentRequest) ) |
687 { |
694 { |
688 //Current request matches a pending event, pass event to connection layer event processing |
695 //Current request matches a pending event, pass event to connection layer event processing |
689 connection.ReceivedEventL(session.PendingEvent()); |
696 connection.ReceivedEventL(session.PendingEvent()); |
690 } |
697 } |
|
698 } |
691 } |
699 } |
692 |
700 |
693 } |
701 } |
694 |
702 |
695 __MTP_HEAP_FLOG |
703 __MTP_HEAP_FLOG |