Skip to content

Commit

Permalink
core: remove way too verbose warnings
Browse files Browse the repository at this point in the history
These warnings should just be debug statements, as it is entirely likely
to see FTP traffic from other systems and components.
  • Loading branch information
julianoes committed Nov 20, 2024
1 parent 0d3be79 commit 7d64db7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
8 changes: 6 additions & 2 deletions src/mavsdk/core/mavlink_ftp_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,13 +107,17 @@ void MavlinkFtpClient::process_mavlink_ftp_message(const mavlink_message_t& msg)
mavlink_msg_file_transfer_protocol_decode(&msg, &ftp_req);

if (ftp_req.target_system != 0 && ftp_req.target_system != _system_impl.get_own_system_id()) {
LogWarn() << "Received FTP with wrong target system ID!";
if (_debugging) {
LogDebug() << "Received FTP message with wrong target system ID";
}
return;
}

if (ftp_req.target_component != 0 &&
ftp_req.target_component != _system_impl.get_own_component_id()) {
LogWarn() << "Received FTP with wrong target component ID!";
if (_debugging) {
LogDebug() << "Received FTP message with wrong target component ID";
}
return;
}

Expand Down
8 changes: 6 additions & 2 deletions src/mavsdk/core/mavlink_ftp_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,17 @@ void MavlinkFtpServer::process_mavlink_ftp_message(const mavlink_message_t& msg)

if (ftp_req.target_system != 0 &&
ftp_req.target_system != _server_component_impl.get_own_system_id()) {
LogWarn() << "wrong sysid!";
if (_debugging) {
LogDebug() << "Received FTP message with wrong target system ID";
}
return;
}

if (ftp_req.target_component != 0 &&
ftp_req.target_component != _server_component_impl.get_own_component_id()) {
LogWarn() << "wrong compid!";
if (_debugging) {
LogDebug() << "Received FTP message with wrong target component ID";
}
return;
}

Expand Down

0 comments on commit 7d64db7

Please sign in to comment.