IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 2, 2010, 11:11:19 AM (16 years ago)
Author:
Paul Price
Message:

Making the assertion that the FITS filehandle has been closed optional and controllable. In the event that an I/O error occurs on the final close, we don't want to produce a failed assertion because we can't close the file.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/camera/pmFPAfile.c

    r27000 r27134  
    2222static int fileNum = 0;                 // Number of file
    2323
     24static bool fpaFileFreeStrict = true;   // Strict checking when file has been freed?
     25
     26bool pmFPAfileFreeSetStrict(bool new)
     27{
     28    bool old = fpaFileFreeStrict;       // Old value, to return
     29    fpaFileFreeStrict = new;
     30    return old;
     31}
     32
    2433static void pmFPAfileFree(pmFPAfile *file)
    2534{
     
    2837    }
    2938
    30     psAssert(file->fits == NULL, "File %s wasn't closed.", file->name);
     39    psAssert(!fpaFileFreeStrict || file->fits == NULL, "File %s wasn't closed.", file->name);
    3140
    3241    psTrace ("pmFPAfileFree", 5, "freeing %s\n", file->name);
Note: See TracChangeset for help on using the changeset viewer.