summaryrefslogtreecommitdiffstats
path: root/mtp/MtpServer.cpp
diff options
context:
space:
mode:
authorEthan Yonker <dees_troy@teamw.in>2014-12-29 15:39:19 +0100
committerEthan Yonker <dees_troy@teamw.in>2014-12-29 16:24:23 +0100
commitee8b314dbc590b2435d07600baa8327c11e67615 (patch)
tree0fd5d413ecaa5cefa552478a6bf81e239ae6c3bd /mtp/MtpServer.cpp
parentAdd TW_IGNORE_MT_POSITION_0 touch flag (diff)
downloadandroid_bootable_recovery-ee8b314dbc590b2435d07600baa8327c11e67615.tar
android_bootable_recovery-ee8b314dbc590b2435d07600baa8327c11e67615.tar.gz
android_bootable_recovery-ee8b314dbc590b2435d07600baa8327c11e67615.tar.bz2
android_bootable_recovery-ee8b314dbc590b2435d07600baa8327c11e67615.tar.lz
android_bootable_recovery-ee8b314dbc590b2435d07600baa8327c11e67615.tar.xz
android_bootable_recovery-ee8b314dbc590b2435d07600baa8327c11e67615.tar.zst
android_bootable_recovery-ee8b314dbc590b2435d07600baa8327c11e67615.zip
Diffstat (limited to '')
-rwxr-xr-xmtp/MtpServer.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/mtp/MtpServer.cpp b/mtp/MtpServer.cpp
index 142b821b8..2c6d37648 100755
--- a/mtp/MtpServer.cpp
+++ b/mtp/MtpServer.cpp
@@ -192,11 +192,12 @@ void MtpServer::run() {
MTPD("About to read device...\n");
int ret = mRequest.read(fd);
if (ret < 0) {
- MTPD("request read returned %d, errno: %d", ret, errno);
if (errno == ECANCELED) {
// return to top of loop and wait for next command
+ MTPD("request read returned %d ECANCELED, starting over\n", ret);
continue;
}
+ MTPE("request read returned %d, errno: %d, exiting MtpServer::run loop\n", ret, errno);
break;
}
MtpOperationCode operation = mRequest.getOperationCode();
@@ -213,11 +214,12 @@ void MtpServer::run() {
if (dataIn) {
int ret = mData.read(fd);
if (ret < 0) {
- MTPD("data read returned %d, errno: %d", ret, errno);
if (errno == ECANCELED) {
// return to top of loop and wait for next command
+ MTPD("data read returned %d ECANCELED, starting over\n", ret);
continue;
}
+ MTPD("data read returned %d, errno: %d, exiting MtpServer::run loop\n", ret, errno);
break;
}
MTPD("received data:");
@@ -234,11 +236,12 @@ void MtpServer::run() {
mData.dump();
ret = mData.write(fd);
if (ret < 0) {
- MTPD("request write returned %d, errno: %d", ret, errno);
if (errno == ECANCELED) {
// return to top of loop and wait for next command
+ MTPD("data write returned %d ECANCELED, starting over\n", ret);
continue;
}
+ MTPE("data write returned %d, errno: %d, exiting MtpServer::run loop\n", ret, errno);
break;
}
}
@@ -249,11 +252,12 @@ void MtpServer::run() {
MTPD("ret: %d\n", ret);
mResponse.dump();
if (ret < 0) {
- MTPD("request write returned %d, errno: %d", ret, errno);
if (errno == ECANCELED) {
// return to top of loop and wait for next command
+ MTPD("response write returned %d ECANCELED, starting over\n", ret);
continue;
}
+ MTPE("response write returned %d, errno: %d, exiting MtpServer::run loop\n", ret, errno);
break;
}
} else {