Skip to content

Commit 0c265c8

Browse files
mikeandroidAndroid (Google) Code Review
authored andcommitted
Merge "MtpServer: Pass 0xFFFFFFFF for file size when receiving files >= 4GB in size" into ics-mr0
2 parents 48cf582 + 8334038 commit 0c265c8

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

media/mtp/MtpServer.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -947,7 +947,12 @@ MtpResponseCode MtpServer::doSendObject() {
947947

948948
if (mSendObjectFileSize - initialData > 0) {
949949
mfr.offset = initialData;
950-
mfr.length = mSendObjectFileSize - initialData;
950+
if (mSendObjectFileSize == 0xFFFFFFFF) {
951+
// tell driver to read until it receives a short packet
952+
mfr.length = 0xFFFFFFFF;
953+
} else {
954+
mfr.length = mSendObjectFileSize - initialData;
955+
}
951956

952957
LOGV("receiving %s\n", (const char *)mSendObjectFilePath);
953958
// transfer the file

0 commit comments

Comments
 (0)