IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 26, 2008, 3:39:54 PM (18 years ago)
Author:
jhoblitt
Message:

consitently handle *_id fields as numeric values instead of converting back of forth between ints and strings

File:
1 edited

Legend:

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

    r18328 r18336  
    170170
    171171    // required
    172     PXOPT_LOOKUP_STR(exp_id, config->args, "-exp_id", true, false);
     172    PXOPT_LOOKUP_S64(exp_id, config->args, "-exp_id", true, false);
    173173    PXOPT_LOOKUP_STR(exp_name, config->args, "-exp_name", true, false);
    174174    PXOPT_LOOKUP_STR(camera, config->args, "-inst", true, false);
     
    230230    if (!rawImfileInsert(
    231231        config->dbh,
    232         (psS64)atoll(exp_id),
     232        exp_id,
    233233        exp_name,
    234234        camera,
     
    496496
    497497    // required
    498     PXOPT_LOOKUP_STR(exp_id, config->args, "-exp_id", true, false);
     498    PXOPT_LOOKUP_S64(exp_id, config->args, "-exp_id", true, false);
    499499    PXOPT_LOOKUP_STR(exp_name, config->args, "-exp_name", true, false);
    500500    PXOPT_LOOKUP_STR(camera, config->args, "-inst", true, false);
     
    569569        // build a query to search by exp_id
    570570        psMetadata *where = psMetadataAlloc();
    571         if (!psMetadataAddStr(where, PS_LIST_TAIL, "newExp.exp_id", 0, "==", exp_id)) {
     571        if (!psMetadataAddS64(where, PS_LIST_TAIL, "newExp.exp_id", 0, "==", exp_id)) {
    572572            psError(PS_ERR_UNKNOWN, false, "failed to add item exp_id");
    573573            psFree(where);
     
    652652
    653653    if (!rawExpInsert(config->dbh,
    654         (psS64)atoll(exp_id),
     654        exp_id,
    655655        exp_name,
    656656        camera,
     
    726726            psError(PS_ERR_UNKNOWN, false, "database error");
    727727        }
    728         psError(PS_ERR_UNKNOWN, false, "failed to change newExp.state for exp_id: %s", exp_id);
     728        psError(PS_ERR_UNKNOWN, false, "failed to change newExp.state for exp_id: %"PRId64, exp_id);
    729729    psFree(newExp);
    730730        return false;
     
    749749    // this can only be run as the newExp's state has been set to stop
    750750    if (!pxchipQueueByExpTag(config,
    751                 (psS64)atoll(exp_id),
     751                exp_id,
    752752                workdir,
    753753            label,
     
    797797
    798798    // XX test this out; need to make this consistent with the list in regtoolConfig.c
    799     PXOPT_COPY_STR(config->args, config->where,  "-exp_id", "exp_id", "==");
     799    PXOPT_COPY_S64(config->args, config->where,  "-exp_id", "exp_id", "==");
    800800    PXOPT_COPY_STR(config->args, config->where,  "-exp_name", "exp_name", "==");
    801801    PXOPT_COPY_STR(config->args, config->where,  "-inst", "camera", "==");
Note: See TracChangeset for help on using the changeset viewer.