IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 35228


Ignore:
Timestamp:
Mar 4, 2013, 2:37:14 PM (13 years ago)
Author:
bills
Message:

Fix SEGV in addtool -processedexp by defaulting stage to "cam"

Location:
trunk/ippTools/src
Files:
2 edited

Legend:

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

    r34265 r35228  
    988988    if (strcmp (stage,"cam") == 0) {
    989989      query = pxDataGet("addtool_find_processedexp_cam.sql");
    990     }
    991     if (strcmp (stage,"stack") == 0) {
     990    } else if (strcmp (stage,"stack") == 0) {
    992991      query = pxDataGet("addtool_find_processedexp_stack.sql");
    993     }
    994     if (strcmp (stage,"staticsky") == 0) {
     992    } else if (strcmp (stage,"staticsky") == 0) {
    995993      query = pxDataGet("addtool_find_processedexp_staticsky_multi.sql");
    996     }
    997     if (strcmp (stage,"skycal") == 0) {
     994    } else if (strcmp (stage,"skycal") == 0) {
    998995      query = pxDataGet("addtool_find_processedexp_skycal.sql");
     996    } else {
     997        psFree(where);
     998        psError(PXTOOLS_ERR_CONFIG, false, "can't find sql file for stage %s", stage);
     999        return false;
    9991000    }
    10001001
  • trunk/ippTools/src/addtoolConfig.c

    r34265 r35228  
    125125    psMetadataAddS64(processedexpArgs, PS_LIST_TAIL, "-add_id",   0,            "search by add_id", 0);
    126126    psMetadataAddS64(processedexpArgs, PS_LIST_TAIL, "-stage_id",   0,            "search by stage_id", 0);
    127     psMetadataAddStr(processedexpArgs, PS_LIST_TAIL, "-stage",             0, "set the stage", NULL);
     127    psMetadataAddStr(processedexpArgs, PS_LIST_TAIL, "-stage",             0, "set the stage", "cam");
    128128    pxcamSetSearchArgs(processedexpArgs);
    129129    psMetadataAddStr(processedexpArgs, PS_LIST_TAIL, "-label", PS_META_DUPLICATE_OK, "search by addRun label", NULL);
Note: See TracChangeset for help on using the changeset viewer.