mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 06:28:27 -04:00
GCS_MAVLink: fixed FTP terminate session error
this caused ftp downloads to intermittently fail. The cause is the FTP client may ask for a session terminate and then immediately afterwards a ftp open. The open would fail as the ftp session was considered active
This commit is contained in:
parent
1c87a48774
commit
e1883bcaa4
@ -116,7 +116,11 @@ bool GCS_MAVLINK::send_ftp_reply(const pending_ftp &reply)
|
|||||||
reply.chan,
|
reply.chan,
|
||||||
0, reply.sysid, reply.compid,
|
0, reply.sysid, reply.compid,
|
||||||
payload);
|
payload);
|
||||||
ftp.last_send_ms = AP_HAL::millis();
|
if (reply.req_opcode == FTP_OP::TerminateSession) {
|
||||||
|
ftp.last_send_ms = 0;
|
||||||
|
} else {
|
||||||
|
ftp.last_send_ms = AP_HAL::millis();
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user