Skip to content

Commit

Permalink
AP_Logger: send data requested before handling new xfr req on same file
Browse files Browse the repository at this point in the history
if we are still streaming out data from a previous request then drop any attempt to change what we send.

This will prevent over-eager clients from requesting data that we have already sent but hasn't gotten to the client yet
  • Loading branch information
peterbarker committed Mar 6, 2024
1 parent 3ca6e29 commit 2cebd28
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions libraries/AP_Logger/AP_Logger_MAVLinkLogTransfer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,10 @@ void AP_Logger::handle_log_request_data(GCS_MAVLINK &link, const mavlink_message

uint32_t end;
get_log_boundaries(packet.id, _log_data_page, end);
} else if (transfer_activity == TransferActivity::SENDING &&
_log_data_remaining) {
// ignore any request for different data while we have blocks to send
return;
}

_log_data_offset = packet.ofs;
Expand Down

0 comments on commit 2cebd28

Please sign in to comment.