nasa / CF

The Core Flight System (cFS) CFDP application.
Apache License 2.0
80 stars 45 forks source link

Fix #441, cf delete files during error when tx #443

Closed avan989 closed 2 months ago

avan989 commented 4 months ago

Fix #441, Update to handle error during tx.

  1. For polling, the file gets moved or deleted to pervent infinite loop
  2. For others, the file does not get deleted.

Checklist (Please check before submitting)

Describe the contribution A clear and concise description of what the contribution is. Fixes #441, cf was deleting file during error. This update how the cf handle error during tx.

Testing performed Steps taken to test the contribution: Tested against DACINCI's build

  1. Set the polling directory to class 2 (ACK)
  2. make SIMULATION=native TARGET=pclinux prep
  3. make install
  4. Create a 100KB.txt file.
  5. Tested with polling directory and tested with tx file command.

Expected behavior changes A clear and concise description of how this contribution will change behavior and level of impact. Two updates:

  1. If an error occurs in a polling directory - it will attempt to move the file to a "fail directory". If it cannot, it will delete the file to prevent an infinite cycle of trying to transmit.
  2. If it was a tx file command and not in a polling directory, it would not delete the file.

System(s) tested on docker - ubunutu 22.04

Additional context Add any other context about the contribution here.

Third party code If included, identify any third party code and provide text file of the license

Contributor Info - All information REQUIRED for consideration of pull request Full name and company/organization/center of all contributors ("Personal" if individual work)

avan989 commented 2 months ago

closing pull request.