IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jan 21, 2006, 7:16:02 PM (21 years ago)
Author:
jhoblitt
Message:

fix handling of no search parameters

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippTools/src/p2searchRawFrames.c

    r6151 r6157  
    55    PS_ASSERT_PTR_NON_NULL(config, NULL);
    66
    7     // build 'where' structure
    8     psMetadata *where = NULL;
     7    psMetadata *where = psMetadataAlloc();
    98   
    10 //    psMetadataAddS32  (where, PS_LIST_TAIL, "TYPE",  0, "==", P2_TYPE_OBJECT);
    11 
    129    if (config->camera_name != NULL) {
    1310        psMetadataAddStr(where, PS_LIST_TAIL, "camera", 0, "==",
     
    2623    */
    2724
     25    // if no search criteria were added then set where to NULL to search for
     26    // everything
     27    // XXX fix handling of where
     28    if (where->list->n < 1) {
     29        psFree(where);
     30        where = NULL;
     31    }
     32
    2833    psArray *exposures = rawScienceExpSelectRowObjects(config->database, where,
    2934        MAX_ROWS);
    30     psFree (where);
     35    psFree(where);
    3136    if (!exposures) {
    3237        psError(PS_ERR_UNKNOWN, false, "no rawScienceExp rows found");
Note: See TracChangeset for help on using the changeset viewer.