mtptransports/mtpusbtransport/usbsic_imp/src/cmtpusbconnection.cpp
changeset 31 a26669f87b46
parent 29 3ae5cb0b4c02
child 35 c4c427c00f31
equal deleted inserted replaced
29:3ae5cb0b4c02 31:a26669f87b46
   634 
   634 
   635 void CMTPUsbConnection::SendInterruptDataCompleteL(TInt aError, const MMTPType& /*aData*/)
   635 void CMTPUsbConnection::SendInterruptDataCompleteL(TInt aError, const MMTPType& /*aData*/)
   636     {
   636     {
   637     __FLOG(_L8("SendInterruptDataCompleteL - Entry"));
   637     __FLOG(_L8("SendInterruptDataCompleteL - Entry"));
   638     iEventPending = EFalse;	
   638     iEventPending = EFalse;	
       
   639     
       
   640     if ( NULL != iProtocolLayer)
       
   641         {
   639     BoundProtocolLayer().SendEventCompleteL(aError, iMTPEvent);
   642     BoundProtocolLayer().SendEventCompleteL(aError, iMTPEvent);
       
   643         }
   640     __FLOG(_L8("SendInterruptDataCompleteL - Exit"));
   644     __FLOG(_L8("SendInterruptDataCompleteL - Exit"));
   641     }    
   645     }    
   642 
   646 
   643 /**
   647 /**
   644 Provides the logical endpoint bit position bits of the specified endpoint.
   648 Provides the logical endpoint bit position bits of the specified endpoint.
  1356     TBool valid(iBulkTransactionState == aExpectedTransactionState);
  1360     TBool valid(iBulkTransactionState == aExpectedTransactionState);
  1357     if (!valid)
  1361     if (!valid)
  1358         {
  1362         {
  1359         // Invalid bulk transaction state, close the connection.
  1363         // Invalid bulk transaction state, close the connection.
  1360         __FLOG_VA((_L8("Expected bulk transaction state = %d"), aExpectedTransactionState));
  1364         __FLOG_VA((_L8("Expected bulk transaction state = %d"), aExpectedTransactionState));
       
  1365 
       
  1366         //if transaction is in request phase, while the container type of data we received is other transaction phase,
       
  1367         //just ignore the data and initiate another request receiving. 
       
  1368         if (ERequestPhase == iBulkTransactionState)
       
  1369             {
       
  1370             InitiateBulkRequestSequenceL();
       
  1371             }
       
  1372         else
       
  1373             {
  1361         CloseConnection();
  1374         CloseConnection();
       
  1375             }
  1362         }
  1376         }
  1363     __FLOG(_L8("BulkRequestTransactionStateValid - Exit"));
  1377     __FLOG(_L8("BulkRequestTransactionStateValid - Exit"));
  1364     return valid;
  1378     return valid;
  1365     }
  1379     }
  1366     
  1380     
  1501 void CMTPUsbConnection::BulkEndpointsStallL()
  1515 void CMTPUsbConnection::BulkEndpointsStallL()
  1502     {
  1516     {
  1503     __FLOG(_L8("BulkEndpointsStallL - Entry"));
  1517     __FLOG(_L8("BulkEndpointsStallL - Entry"));
  1504     EndpointStallL(EMTPUsbEpBulkIn);
  1518     EndpointStallL(EMTPUsbEpBulkIn);
  1505     EndpointStallL(EMTPUsbEpBulkOut);
  1519     EndpointStallL(EMTPUsbEpBulkOut);
       
  1520     SetDeviceStatus(EMTPUsbDeviceStatusTransactionCancelled);
  1506     __FLOG(_L8("BulkEndpointsStallL - Exit"));
  1521     __FLOG(_L8("BulkEndpointsStallL - Exit"));
  1507     }
  1522     }
  1508 
  1523 
  1509 /**
  1524 /**
  1510 Clears stall conditions all but the control endpoint.
  1525 Clears stall conditions all but the control endpoint.