IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 11, 2006, 10:53:01 AM (20 years ago)
Author:
magnier
Message:

adding error checks to processContents results

File:
1 edited

Legend:

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

    r7492 r7515  
    577577    }
    578578
     579    // is FPAname already defined, new name must match it
     580    // XXX if not, is it an error?
    579581    const char *currentFPAname = psMetadataLookupStr(&mdok, fpa->concepts, "FPA.NAME"); // Current name
    580582    if (mdok && currentFPAname && strlen(currentFPAname) > 0 && strcmp(currentFPAname, newFPAname) != 0) {
     
    694696        psFree(chipName);
    695697
    696         processContents(fpa, chip, cell, phdu, level, content, format);
     698        if (processContents(fpa, chip, cell, phdu, level, content, format) < 0) {
     699            psError(PS_ERR_IO, false, "Error setting CONTENTS");
     700            psFree(phdu);
     701            psFree(view);
     702            return NULL;
     703        }
    697704        psFree(phdu);
    698705        return view;
     
    758765        hdu->format = psMemIncrRefCounter(format);
    759766
    760         processContents(fpa, chip, cell, hdu, level, contentsItem->data.V, format);
     767        if (processContents(fpa, chip, cell, hdu, level, contentsItem->data.V, format) < 0) {
     768            psError(PS_ERR_IO, false, "Error setting CONTENTS");
     769            psFree(view);
     770            psFree(hdu);
     771            psFree(contentsIter);
     772            return NULL;
     773        }
    761774        psFree(hdu);
    762775    }
Note: See TracChangeset for help on using the changeset viewer.