IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Apr 23, 2010, 2:48:49 PM (16 years ago)
Author:
Paul Price
Message:

Reverting undesirable change.

File:
1 edited

Legend:

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

    r27746 r27762  
    133133    assert(hdu);
    134134
    135     if (!fpa->hdu) {
    136         fpa->hdu = psMemIncrRefCounter(hdu);
    137     }
     135    if (fpa->hdu) {
     136        // Something's already here
     137        if (fpa->hdu != hdu) {
     138            psError(PS_ERR_IO, true, "Unable to add HDU since FPA already has one.\n");
     139        }
     140        return false;
     141    }
     142    fpa->hdu = psMemIncrRefCounter(hdu);
    138143    pmFPASetFileStatus(fpa, true);
    139144
     
    150155
    151156    if (chip->hdu) {
    152         chip->hdu = psMemIncrRefCounter(hdu);
    153     }
     157        // Something's already here
     158        if (chip->hdu != hdu) {
     159            psError(PS_ERR_IO, true, "Unable to add HDU since chip already has one.\n");
     160        }
     161        return false;
     162    }
     163    chip->hdu = psMemIncrRefCounter(hdu);
    154164    pmChipSetFileStatus(chip, true);
    155165
     
    166176
    167177    if (cell->hdu) {
    168         cell->hdu = psMemIncrRefCounter(hdu);
    169     }
     178        // Something's already here
     179        if (cell->hdu != hdu) {
     180            psError(PS_ERR_IO, true, "Unable to add HDU since cell already has one.\n");
     181        }
     182        return false;
     183    }
     184    cell->hdu = psMemIncrRefCounter(hdu);
    170185    pmCellSetFileStatus(cell, true);
    171186
Note: See TracChangeset for help on using the changeset viewer.