IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 26828


Ignore:
Timestamp:
Feb 9, 2010, 3:11:49 PM (16 years ago)
Author:
Paul Price
Message:

Check return value of pmFPAfileIOChecks!

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/20091201/pswarp/src/pswarpLoop.c

    r26781 r26828  
    162162        pmChip *chip;
    163163        pmFPAview *view = pmFPAviewAlloc(0);
    164         pmFPAfileIOChecks (config, view, PM_FPA_BEFORE);
     164        if (!pmFPAfileIOChecks (config, view, PM_FPA_BEFORE)) {
     165            return false;
     166        }
    165167        while ((chip = pmFPAviewNextChip (view, input->fpa, 1)) != NULL) {
    166168            psTrace ("pswarp", 4, "Chip %d: %x %x\n", view->chip, chip->file_exists, chip->process);
    167169            if (!chip->process || !chip->file_exists) { continue; }
    168             pmFPAfileIOChecks(config, view, PM_FPA_BEFORE);
     170            if (!pmFPAfileIOChecks(config, view, PM_FPA_BEFORE)) {
     171                return false;
     172            }
    169173            pmCell *cell;
    170174            while ((cell = pmFPAviewNextCell (view, input->fpa, 1)) != NULL) {
    171175                psTrace ("pswarp", 4, "Cell %d: %x %x\n", view->cell, cell->file_exists, cell->process);
    172176                if (!cell->process || !cell->file_exists) { continue; }
    173                 pmFPAfileIOChecks (config, view, PM_FPA_BEFORE);
    174                 pmFPAfileIOChecks (config, view, PM_FPA_AFTER);
    175             }
    176             pmFPAfileIOChecks (config, view, PM_FPA_AFTER);
    177         }
    178         pmFPAfileIOChecks (config, view, PM_FPA_AFTER);
     177                if (!pmFPAfileIOChecks (config, view, PM_FPA_BEFORE) ||
     178                    !pmFPAfileIOChecks (config, view, PM_FPA_AFTER)) {
     179                    return false;
     180                }
     181            }
     182            if (!pmFPAfileIOChecks (config, view, PM_FPA_AFTER)) {
     183                return false;
     184            }
     185        }
     186        if (!pmFPAfileIOChecks (config, view, PM_FPA_AFTER)) {
     187            return false;
     188        }
    179189        psFree(view);
    180190
     
    211221
    212222    // files associated with the science image
    213     pmFPAfileIOChecks (config, view, PM_FPA_BEFORE);
     223    if (!pmFPAfileIOChecks (config, view, PM_FPA_BEFORE)) {
     224        return false;
     225    }
    214226
    215227    pmChip *chip;
     
    217229        psTrace ("pswarp", 4, "Chip %d: %x %x\n", view->chip, chip->file_exists, chip->process);
    218230        if (!chip->process || !chip->file_exists) { continue; }
    219         pmFPAfileIOChecks (config, view, PM_FPA_BEFORE);
     231        if (!pmFPAfileIOChecks (config, view, PM_FPA_BEFORE)) {
     232            return false;
     233        }
    220234
    221235        // read WCS data from the corresponding header
     
    242256            psTrace ("pswarp", 4, "Cell %d: %x %x\n", view->cell, cell->file_exists, cell->process);
    243257            if (!cell->process || !cell->file_exists) { continue; }
    244             pmFPAfileIOChecks (config, view, PM_FPA_BEFORE);
     258            if (!pmFPAfileIOChecks (config, view, PM_FPA_BEFORE)) {
     259                return false;
     260            }
    245261
    246262            psListAdd(cells, PS_LIST_TAIL, cell);
     
    249265            pmReadout *readout;
    250266            while ((readout = pmFPAviewNextReadout(view, input->fpa, 1)) != NULL) {
    251                 pmFPAfileIOChecks(config, view, PM_FPA_BEFORE);
     267                if (!pmFPAfileIOChecks(config, view, PM_FPA_BEFORE)) {
     268                    return false;
     269                }
    252270                if (!readout->data_exists) {
    253271                    continue;
     
    264282                pswarpTransformReadout(output, readout, config);
    265283
    266                 pmFPAfileIOChecks(config, view, PM_FPA_AFTER);
    267             }
    268             pmFPAfileIOChecks(config, view, PM_FPA_AFTER);
    269         }
    270         pmFPAfileIOChecks(config, view, PM_FPA_AFTER);
     284                if (!pmFPAfileIOChecks(config, view, PM_FPA_AFTER)) {
     285                    return false;
     286                }
     287            }
     288            if (!pmFPAfileIOChecks(config, view, PM_FPA_AFTER)) {
     289                return false;
     290            }
     291        }
     292        if (!pmFPAfileIOChecks(config, view, PM_FPA_AFTER)) {
     293            return false;
     294        }
    271295    }
    272296
     
    368392    }
    369393
    370     pmFPAfileIOChecks(config, view, PM_FPA_AFTER);
     394    if (!pmFPAfileIOChecks(config, view, PM_FPA_AFTER)) {
     395        return false;
     396    }
    371397
    372398    // Done with the detector side of things
Note: See TracChangeset for help on using the changeset viewer.