summaryrefslogtreecommitdiff
path: root/examples/device
diff options
context:
space:
mode:
authorstepan chepushtanov <[email protected]>2026-03-05 13:44:34 +0700
committerstepan chepushtanov <[email protected]>2026-03-25 15:43:48 +0700
commit9a03a16c8121301658c24a290c349598f8cf51d5 (patch)
tree8dc60b2826a2a33941577bd1ecda6a2723cf8fb3 /examples/device
parenta64a8579c5bc25ffbe73da55f8431fab6835f3de (diff)
mtp: add sending mtp response if MTP_RESP_OPERATION_NOT_SUPPORTED
Diffstat (limited to 'examples/device')
-rw-r--r--examples/device/mtp/src/mtp_fs_example.c20
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;