mavlink_ftp: add & handle kErrFailFileExists error

This error definitions already existed in QGC
This commit is contained in:
Beat Küng 2017-09-18 12:33:36 +02:00
parent 4778c79201
commit ea587d585f
2 changed files with 8 additions and 1 deletions

View File

@ -261,6 +261,11 @@ out:
payload->req_opcode = payload->opcode;
payload->opcode = kRspNak;
payload->size = 1;
if (r_errno == EEXIST) {
errorCode = kErrFailFileExists;
}
payload->data[0] = errorCode;
if (errorCode == kErrFailErrno) {

View File

@ -117,7 +117,9 @@ public:
kErrInvalidSession, ///< Session is not currently open
kErrNoSessionsAvailable, ///< All available Sessions in use
kErrEOF, ///< Offset past end of file for List and Read commands
kErrUnknownCommand ///< Unknown command opcode
kErrUnknownCommand, ///< Unknown command opcode
kErrFailFileExists, ///< File exists already
kErrFailFileProtected ///< File is write protected
};
unsigned get_size();