summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDongwoo Lee <dwoo08.lee@samsung.com>2022-08-22 17:23:23 +0900
committerJihoon Jung <jh8801.jung@samsung.com>2022-09-01 07:55:04 +0000
commit361d6db400cef5ffde7561278e6b5e743ffa58c0 (patch)
tree651cbf4b80d1b947584b5c0ed09b402ba6835675
parentc9cb1eed065088503f5153eb43b09c0c956c4c92 (diff)
downloadmtp-responder-tizen_7.0.tar.gz
mtp-responder-tizen_7.0.tar.bz2
mtp-responder-tizen_7.0.zip
Currently RESET handler calls read() for control endpoint after mtp reset. However, as comparing with legacy slp handler, send reponse by calling write() is the right way for sending response for RESET. Thus, this fixes to send response instead of waiting additional request. Change-Id: I79e42c40ac30015883db85b42c0cd941bbbbfb39 Signed-off-by: Dongwoo Lee <dwoo08.lee@samsung.com>
-rw-r--r--src/mtp_usb_driver_ffs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mtp_usb_driver_ffs.c b/src/mtp_usb_driver_ffs.c
index a7cea9e..9efbdcb 100644
--- a/src/mtp_usb_driver_ffs.c
+++ b/src/mtp_usb_driver_ffs.c
@@ -546,9 +546,9 @@ static void __handle_control_request(mtp_int32 request)
if (kernel_reset == FALSE) {
kernel_reset = TRUE;
}
- status = read(g_usb_ep0, NULL, 0);
+ status = write(g_usb_ep0, NULL, 0);
if (status < 0) {
- ERR("IOCTL MTP_SEND_RESET_ACK Failed [%d]\n",
+ ERR("Failed to write RESET ACK [%d]\n",
status);
}
break;