nasa / nos3

NASA Operational Simulator for Small Satellites
Other
373 stars 84 forks source link

Check for Open File in CFDP Downlink does not work #162

Closed kabarr closed 7 months ago

kabarr commented 1 year ago

The call to CF_FileOpenCheck in cf_playback.c does not return CF_OPEN for files that are open by Data Store (DS). This results in .ds files that are open being downlinked with a CFDP file or directory playback command. We were able to correct this issue for our needs by changing the check in 2 places (in CF_PlaybackFileCmd and CF_PlaybackDirectoryCmd):

from: if (CF_FileOpenCheck(PlaybackFileCmdPtr->SrcFilename) == CF_OPEN) in CF_PlaybackFileCmd if (CF_FileOpenCheck(FullSrcName) == CF_OPEN) in CF_PlaybackDirectoryCmd

to: if (OS_FileOpenCheck(PlaybackFileCmdPtr->SrcFilename) == OS_SUCCESS) in CF_PlaybackFileCmd if (OS_FileOpenCheck(FullSrcName) == OS_SUCCESS) in CF_PlaybackDirectoryCmd

jlucas9 commented 7 months ago

Resolved in updated CF version which is now integrated into dev