Files
ardupilot/libraries
Peter Barker 94726509fc GCS_MAVLink: do not send FTP reply bytes which mean nothing
The whole reply buffer went out whatever the reply's size, so a short
reply was padded with bytes which are not part of it.

Those bytes come from the same reply, not an earlier one: setup_reply()
clears the whole transaction, but list_dir()'s offset-skip loop then
formats each entry it skips into response.data as scratch, and a listing
which ends in an EndOfFile NAK sets only data[0] - leaving the last
skipped entry sitting behind the error code.

Copy only the bytes the reply says it has. The rest of the packet is
already zero, and since MAVLink 2 trims trailing zeros from a payload, a
short reply now goes out shorter as well.

The scratch reuse behind it is left as it is; not sending the bytes is
what keeps them off the air.
2026-09-12 15:00:50 +10:00
..
2026-09-05 09:08:00 +10:00
2026-09-05 09:08:00 +10:00
…
…