equal
deleted
inserted
replaced
129 TRAPD(err, BulkEndpointsStallL()); |
129 TRAPD(err, BulkEndpointsStallL()); |
130 UNUSED_VAR(err); |
130 UNUSED_VAR(err); |
131 __FLOG(_L8("CloseConnection - Exit")); |
131 __FLOG(_L8("CloseConnection - Exit")); |
132 } |
132 } |
133 |
133 |
134 void CMTPUsbConnection::ReceiveDataL(MMTPType& aData, const TMTPTypeRequest& aRequest) |
134 void CMTPUsbConnection::ReceiveDataL(MMTPType& aData, const TMTPTypeRequest& /*aRequest*/) |
135 { |
135 { |
136 __FLOG(_L8("ReceiveDataL - Entry")); |
136 __FLOG(_L8("ReceiveDataL - Entry")); |
137 |
137 |
138 // Update the transaction state. |
138 // Update the transaction state. |
139 SetBulkTransactionState(EDataIToRPhase); |
139 SetBulkTransactionState(EDataIToRPhase); |
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. |
1252 /** |
1256 /** |
1253 Processes received USB SIC class specific Get Device Status requests |
1257 Processes received USB SIC class specific Get Device Status requests |
1254 @param aRequest The USB SIC class specific request setup data. |
1258 @param aRequest The USB SIC class specific request setup data. |
1255 @leave One of the system wide error codes, if a processing failure occurs. |
1259 @leave One of the system wide error codes, if a processing failure occurs. |
1256 */ |
1260 */ |
1257 void CMTPUsbConnection::ProcessControlRequestDeviceStatusL(const TMTPUsbControlRequestSetup& aRequest) |
1261 void CMTPUsbConnection::ProcessControlRequestDeviceStatusL(const TMTPUsbControlRequestSetup& /*aRequest*/) |
1258 { |
1262 { |
1259 __FLOG(_L8("ProcessControlRequestDeviceStatusL - Entry")); |
1263 __FLOG(_L8("ProcessControlRequestDeviceStatusL - Entry")); |
1260 iUsbControlRequestDeviceStatus.Reset(); |
1264 iUsbControlRequestDeviceStatus.Reset(); |
1261 |
1265 |
1262 TUint offset = 0; |
1266 TUint offset = 0; |
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. |
1667 __FLOG(_L8("Notifying protocol layer connection closed")); |
1682 __FLOG(_L8("Notifying protocol layer connection closed")); |
1668 ret = iConnectionMgr->ConnectionClosed(*this); |
1683 ret = iConnectionMgr->ConnectionClosed(*this); |
1669 SetBulkTransactionState(EUndefined); |
1684 SetBulkTransactionState(EUndefined); |
1670 SetConnectionState(EIdle); |
1685 SetConnectionState(EIdle); |
1671 SetSuspendState(ENotSuspended); |
1686 SetSuspendState(ENotSuspended); |
|
1687 iMTPSessionId = KMTPSessionNone; |
1672 } |
1688 } |
1673 |
1689 |
1674 __FLOG(_L8("StopConnection - Exit")); |
1690 __FLOG(_L8("StopConnection - Exit")); |
1675 |
1691 |
1676 return ret; |
1692 return ret; |