Commit 73868e34 authored by Don Gagne's avatar Don Gagne

Merge pull request #868 from DonLakeFlyer/FTPFix

Fix bug with new kErrFailErrno code
parents 3a98d384 4df96913
......@@ -262,11 +262,13 @@ void QGCUASFileManager::receiveMessage(LinkInterface* link, mavlink_message_t me
break;
}
} else if (request->hdr.opcode == kRspNak) {
Q_ASSERT(request->hdr.size == 1); // Should only have one byte of error code
OperationState previousOperation = _currentOperation;
uint8_t errorCode = request->data[0];
// Nak's normally have 1 byte of data for error code, except for kErrFailErrno which has additional byte for errno
Q_ASSERT((errorCode == kErrFailErrno && request->hdr.size == 2) || request->hdr.size == 1);
_currentOperation = kCOIdle;
if (previousOperation == kCOList && errorCode == kErrEOF) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment