summaryrefslogtreecommitdiffstats
path: root/media/mtp/MtpServer.cpp
diff options
context:
space:
mode:
authorMike Lockwoood <lockwood@google.com>2013-02-08 13:25:01 -0800
committerMike Lockwoood <lockwood@google.com>2013-02-08 13:25:01 -0800
commit0a694951c00f2135c8968fd2205f71899997a8ad (patch)
treedfad37d49a5599e9e740a9563bb6310f2874e78e /media/mtp/MtpServer.cpp
parent92b2bbbb79eb89fe4262c354e8d183c2ba325111 (diff)
downloadframeworks_av-0a694951c00f2135c8968fd2205f71899997a8ad.zip
frameworks_av-0a694951c00f2135c8968fd2205f71899997a8ad.tar.gz
frameworks_av-0a694951c00f2135c8968fd2205f71899997a8ad.tar.bz2
MTP: Write initial data to correct file offset in SendPartialObject
Change-Id: I84288aeda3e65e6e6487f11d32a72910cd16cff2
Diffstat (limited to 'media/mtp/MtpServer.cpp')
-rw-r--r--media/mtp/MtpServer.cpp2
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;
}