Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

More FTP work #1345

Merged
merged 7 commits into from
Sep 6, 2014
Merged

More FTP work #1345

merged 7 commits into from
Sep 6, 2014

Conversation

DonLakeFlyer
Copy link
Contributor

  • Restructured code to flatten class hierarchy and support unit testing
  • Refactored command opcodes and error codes. Largest change is instead of trying to return a pack of descriptive error codes for the various file system related commands. If a file system command fails, kErrFailErrno is returned, with the errno from the call in data[2]. Then the client can decide how fancy they want to get with error handling/display.
  • Added support for create/remove directory and create file. (Only missing command now is write file)
  • Added comprehensive unit tests for all of the above
  • Fixed bugs found by the unit test
  • Improved unit test support code

For code review, best viewed as completely new files intend of trying to make sense of the diff.

- Added init/cleanup calls before after test
- Added ut_compare macro with better failure reporting
- Restructured to a flatter class implementation
- Added support for create/remove directory, remove file
- Refactored error codes and command opcodes
- Added unit test support
- Fixed bugs found by unit test
@DonLakeFlyer DonLakeFlyer mentioned this pull request Sep 2, 2014
24 tasks
@vooon
Copy link
Contributor

vooon commented Sep 3, 2014

My thoughts:

  1. Set kRspAck = 128 (so we could add kCmd's with backwards compatibility)
  2. Add field uint8_t rsp_opcode for return original request opcode in kRspAck/kRspNak (i think it should be between size and padding).
  3. Remove crc32 calculation (just not to loose)

@vooon
Copy link
Contributor

vooon commented Sep 3, 2014

Also need command to open file for write (not creat()) with random write access.

So i can do something like this:

int fd = open("remote/file", 0);
write(fd, "my data1", 8);
lseek(fd, 4, SEEK_SET);
write(fd, "ata2", 4);

LorenzMeier added a commit that referenced this pull request Sep 6, 2014
@LorenzMeier LorenzMeier merged commit 1a89b80 into PX4:master Sep 6, 2014
@vooon vooon mentioned this pull request Sep 9, 2014
@DonLakeFlyer DonLakeFlyer deleted the FTP branch September 10, 2014 03:31
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants