diff options
author | Mike Lockwoood <lockwood@google.com> | 2013-02-08 13:25:01 -0800 |
---|---|---|
committer | Mike Lockwoood <lockwood@google.com> | 2013-02-08 13:25:01 -0800 |
commit | 38fb629c46efb74517332696d5d117f4466fa3f0 (patch) | |
tree | 27a6883c8003ea76befc4b57c6986f145f983f96 /media/mtp | |
parent | 1cca13c79ff7e3f36a2fc6e564b60f5e57d00919 (diff) | |
download | frameworks_av-38fb629c46efb74517332696d5d117f4466fa3f0.zip frameworks_av-38fb629c46efb74517332696d5d117f4466fa3f0.tar.gz frameworks_av-38fb629c46efb74517332696d5d117f4466fa3f0.tar.bz2 |
MTP: Write initial data to correct file offset in SendPartialObject
Change-Id: I84288aeda3e65e6e6487f11d32a72910cd16cff2
Diffstat (limited to 'media/mtp')
-rw-r--r-- | media/mtp/MtpServer.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/media/mtp/MtpServer.cpp b/media/mtp/MtpServer.cpp index 662a93d..8568dfc 100644 --- a/media/mtp/MtpServer.cpp +++ b/media/mtp/MtpServer.cpp @@ -1118,7 +1118,7 @@ MtpResponseCode MtpServer::doSendPartialObject() { int initialData = ret - MTP_CONTAINER_HEADER_SIZE; if (initialData > 0) { - ret = write(edit->mFD, mData.getData(), initialData); + ret = pwrite(edit->mFD, mData.getData(), initialData, offset); offset += initialData; length -= initialData; } |