diff options
| author | Zixun LI <[email protected]> | 2026-03-27 15:31:10 +0100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2026-03-27 15:31:10 +0100 |
| commit | a2cca43290d0ddb4eedc2cc5ba096deca5471012 (patch) | |
| tree | 4598206c0b32edf48982a1b702f113ebea8aa0ac /examples/device | |
| parent | 096458defffe3ca183169f9e2116c322074f4b1e (diff) | |
| parent | f9d86936a46479a68f30925a6fb2c0aa4de00a85 (diff) | |
Merge pull request #3570 from IntegraSources/mtp-changes
mtp: fixes in add_string
Diffstat (limited to 'examples/device')
| -rw-r--r-- | examples/device/mtp/src/mtp_fs_example.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/examples/device/mtp/src/mtp_fs_example.c b/examples/device/mtp/src/mtp_fs_example.c index 60fc9f79e..09697693e 100644 --- a/examples/device/mtp/src/mtp_fs_example.c +++ b/examples/device/mtp/src/mtp_fs_example.c @@ -275,11 +275,11 @@ int32_t tud_mtp_command_received_cb(tud_mtp_cb_data_t* cb_data) { resp_code = MTP_RESP_OPERATION_NOT_SUPPORTED; } else { resp_code = handler(cb_data); - if (resp_code > MTP_RESP_UNDEFINED) { - // send response if needed - io_container->header->code = (uint16_t)resp_code; - tud_mtp_response_send(io_container); - } + } + if (resp_code > MTP_RESP_UNDEFINED) { + // send response if needed + io_container->header->code = (uint16_t)resp_code; + tud_mtp_response_send(io_container); } return resp_code; @@ -302,11 +302,11 @@ int32_t tud_mtp_data_xfer_cb(tud_mtp_cb_data_t* cb_data) { resp_code = MTP_RESP_OPERATION_NOT_SUPPORTED; } else { resp_code = handler(cb_data); - if (resp_code > MTP_RESP_UNDEFINED) { - // send response if needed - io_container->header->code = (uint16_t)resp_code; - tud_mtp_response_send(io_container); - } + } + if (resp_code > MTP_RESP_UNDEFINED) { + // send response if needed + io_container->header->code = (uint16_t)resp_code; + tud_mtp_response_send(io_container); } return 0; |
