Skip to content

Commit

Permalink
mtp-responder: respond GET_STATUS DATA when host get device status
Browse files Browse the repository at this point in the history
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
  • Loading branch information
Donny9 authored and xiaoxiang781216 committed Jan 7, 2025
1 parent 6132dc8 commit 9492875
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/mtp_usb_driver_nuttx.c
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,11 @@ static void __handle_control_request(mtp_int32 request)
sent_busy = FALSE;
}

status = write(g_usb_ep0, &statusreq_data, sizeof(statusreq_data));
if (status < 0) {
ERR("IOCTL MTP_SEND_STATUS_ACK Failed [%d]\n",
errno);
}
break;

case USB_PTPREQUEST_GETEVENT:
Expand Down

0 comments on commit 9492875

Please sign in to comment.