Skip to content

Commit

Permalink
mtp-responder: Send setup response if in state DATA_TRANSFER_DL
Browse files Browse the repository at this point in the history
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
  • Loading branch information
JianyuWang0623 authored and xiaoxiang781216 committed Jan 7, 2025
1 parent 80b84de commit 5cba154
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/mtp_usb_driver_nuttx.c
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,8 @@ static void __handle_control_request(mtp_int32 request)
sent_busy = FALSE;
}

if (_transport_get_mtp_operation_state() == MTP_STATE_ONSERVICE) {
if (_transport_get_mtp_operation_state() == MTP_STATE_ONSERVICE ||
_transport_get_mtp_operation_state() == MTP_STATE_DATA_TRANSFER_DL) {
status = write(g_usb_ep0, &statusreq_data, sizeof(statusreq_data));
if (status < 0) {
ERR("IOCTL MTP_SEND_STATUS_ACK Failed [%d]\n",
Expand Down

0 comments on commit 5cba154

Please sign in to comment.