MtpServer: Pass 0xFFFFFFFF for file size when receiving files >= 4GB in size
Bug: 5432487 Change-Id: Ie86e72d9d85476941eab6a9d271948b8fdde6926 Signed-off-by: Mike Lockwood <lockwood@android.com>
This commit is contained in:
@@ -947,7 +947,12 @@ MtpResponseCode MtpServer::doSendObject() {
|
||||
|
||||
if (mSendObjectFileSize - initialData > 0) {
|
||||
mfr.offset = initialData;
|
||||
mfr.length = mSendObjectFileSize - initialData;
|
||||
if (mSendObjectFileSize == 0xFFFFFFFF) {
|
||||
// tell driver to read until it receives a short packet
|
||||
mfr.length = 0xFFFFFFFF;
|
||||
} else {
|
||||
mfr.length = mSendObjectFileSize - initialData;
|
||||
}
|
||||
|
||||
LOGV("receiving %s\n", (const char *)mSendObjectFilePath);
|
||||
// transfer the file
|
||||
|
||||
Reference in New Issue
Block a user