IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Apr 23, 2010, 11:27:26 AM (16 years ago)
Author:
Paul Price
Message:

Don't care if there's already an HDU there, so long as it has one.

File:
1 edited

Legend:

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

    r22699 r27746  
    133133    assert(hdu);
    134134
    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);
     135    if (!fpa->hdu) {
     136        fpa->hdu = psMemIncrRefCounter(hdu);
     137    }
    143138    pmFPASetFileStatus(fpa, true);
    144139
     
    155150
    156151    if (chip->hdu) {
    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);
     152        chip->hdu = psMemIncrRefCounter(hdu);
     153    }
    164154    pmChipSetFileStatus(chip, true);
    165155
     
    176166
    177167    if (cell->hdu) {
    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);
     168        cell->hdu = psMemIncrRefCounter(hdu);
     169    }
    185170    pmCellSetFileStatus(cell, true);
    186171
Note: See TracChangeset for help on using the changeset viewer.