summaryrefslogtreecommitdiffstats
path: root/mtp/MtpDataPacket.cpp
diff options
context:
space:
mode:
authorEthan Yonker <dees_troy@teamw.in>2017-08-25 04:45:50 +0200
committerEthan Yonker <dees_troy@teamw.in>2017-08-25 04:45:50 +0200
commit95e8007578193422ef7fe2d098b80e8ba99fc48d (patch)
tree856f90d15b1f7c74d497503bd6ac6fd12b08b32d /mtp/MtpDataPacket.cpp
parentMerge "Fix typos / inconsistencies in German language" into android-7.1 (diff)
downloadandroid_bootable_recovery-95e8007578193422ef7fe2d098b80e8ba99fc48d.tar
android_bootable_recovery-95e8007578193422ef7fe2d098b80e8ba99fc48d.tar.gz
android_bootable_recovery-95e8007578193422ef7fe2d098b80e8ba99fc48d.tar.bz2
android_bootable_recovery-95e8007578193422ef7fe2d098b80e8ba99fc48d.tar.lz
android_bootable_recovery-95e8007578193422ef7fe2d098b80e8ba99fc48d.tar.xz
android_bootable_recovery-95e8007578193422ef7fe2d098b80e8ba99fc48d.tar.zst
android_bootable_recovery-95e8007578193422ef7fe2d098b80e8ba99fc48d.zip
Diffstat (limited to '')
-rw-r--r--mtp/MtpDataPacket.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/mtp/MtpDataPacket.cpp b/mtp/MtpDataPacket.cpp
index 2c517252a..845db968e 100644
--- a/mtp/MtpDataPacket.cpp
+++ b/mtp/MtpDataPacket.cpp
@@ -427,7 +427,11 @@ int MtpDataPacket::readDataAsync(struct usb_request *req) {
// Wait for result of readDataAsync
int MtpDataPacket::readDataWait(struct usb_device *device) {
+#ifdef HAS_USBHOST_TIMEOUT
+ struct usb_request *req = usb_request_wait(device, 200);
+#else
struct usb_request *req = usb_request_wait(device);
+#endif
return (req ? req->actual_length : -1);
}