equal
deleted
inserted
replaced
1083 }while( uRestTimeToWait > 0); |
1083 }while( uRestTimeToWait > 0); |
1084 |
1084 |
1085 readBuf.Close(); |
1085 readBuf.Close(); |
1086 __FLOG(_L8("FlushRxDataL - Exit")); |
1086 __FLOG(_L8("FlushRxDataL - Exit")); |
1087 } |
1087 } |
|
1088 |
|
1089 /* |
|
1090 * The difference with FlushRxDataL() is FlushBufferedRxDataL only flush current buffered trash data |
|
1091 * if currently no data is buffered in usb driver, just return rather than wait some time like what |
|
1092 * FlushRxDataL() does |
|
1093 */ |
|
1094 void CMTPUsbEpBase::FlushBufferedRxDataL() |
|
1095 { |
|
1096 //flush buffered rx data |
|
1097 TInt nbytes = 0; |
|
1098 TInt err = Connection().Ldd().QueryReceiveBuffer(EndpointNumber(), nbytes); |
|
1099 |
|
1100 // has data, read it |
|
1101 if( (err == KErrNone) && (nbytes > 0) ) |
|
1102 { |
|
1103 // create the read buff |
|
1104 RBuf8 readBuf; |
|
1105 readBuf.CreateL(nbytes); |
|
1106 // synchronously read the data |
|
1107 TRequestStatus status; |
|
1108 Connection().Ldd().ReadOneOrMore(status, EndpointNumber(), readBuf); |
|
1109 User::WaitForRequest(status); |
|
1110 readBuf.Close(); |
|
1111 } |
|
1112 } |