IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 20, 2009, 12:42:13 PM (17 years ago)
Author:
watersc1
Message:

More merging

Location:
branches/czw_branch/cleanup
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/czw_branch/cleanup

  • branches/czw_branch/cleanup/ippTools/src/pstamptool.c

    r25149 r25158  
    315315    PS_ASSERT_PTR_NON_NULL(config, false);
    316316
    317     psMetadata *where = psMetadataAlloc();
    318     PXOPT_COPY_S64(config->args, where, "-req_id", "req_id", "==");
    319     PXOPT_COPY_STR(config->args, where, "-name", "name", "==");
    320 
     317    PXOPT_LOOKUP_S64(req_id,  config->args, "-req_id", false, false);
     318    PXOPT_LOOKUP_STR(name,  config->args, "-name", false, false);
    321319    PXOPT_LOOKUP_U64(limit,   config->args, "-limit",  false, false);
    322320    PXOPT_LOOKUP_BOOL(simple, config->args, "-simple", false);
    323321
    324     if (!psListLength(where->list)) {
     322    if (!req_id && !name) {
    325323        psError(PS_ERR_UNKNOWN, true, "-req_id or -name must be supplied");
    326324        return false;
    327325    }
    328326
    329     psString query = psStringCopy("SELECT * from pstampRequest");
    330 
    331     psString whereClause = psDBGenerateWhereConditionSQL(where, NULL);
    332     psStringAppend(&query, " WHERE %s", whereClause);
    333     psFree(whereClause);
    334     psFree(where);
     327    psString query = NULL;
     328    psStringAppend(&query, "SELECT * from pstampRequest WHERE req_id = %" PRId64, req_id);
    335329   
    336330    // treat limit == 0 as "no limit"
     
    529523
    530524    // default value for job_type is defined in pstamptoolConfig.c
    531     if (!strcmp(job_type, "get_image") || !strcmp(job_type, "detect_query") || !strcmp(job_type, "none")) {
     525    if (!strcmp(job_type, "get_image") || !strcmp(job_type, "detect_query")) {
    532526        stampJob = false;
    533527    } else if (!strcmp(job_type, "stamp")) {
Note: See TracChangeset for help on using the changeset viewer.