IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 25, 2008, 4:43:13 PM (18 years ago)
Author:
jhoblitt
Message:

add chiptool -updaterun

File:
1 edited

Legend:

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

    r16170 r17148  
    3131bool pxchipRunSetState(pxConfig *config, psS64 chip_id, const char *state)
    3232{
     33    PS_ASSERT_PTR_NON_NULL(config, false);
    3334    PS_ASSERT_PTR_NON_NULL(state, false);
    3435
     
    4748    char *query = "UPDATE chipRun SET state = '%s' WHERE chip_id = %" PRId64;
    4849    if (!p_psDBRunQuery(config->dbh, query, state, chip_id)) {
     50        psError(PS_ERR_UNKNOWN, false,
     51                "failed to change state for chip_id %" PRId64, chip_id);
     52        return false;
     53    }
     54
     55    return true;
     56}
     57
     58
     59bool pxchipRunSetLabel(pxConfig *config, psS64 chip_id, const char *label)
     60{
     61    PS_ASSERT_PTR_NON_NULL(config, false);
     62    // note label == NULL should be explicitly allowed
     63 
     64    char *query = "UPDATE chipRun SET label = '%s' WHERE chip_id = %" PRId64;
     65    if (!p_psDBRunQuery(config->dbh, query, label, chip_id)) {
    4966        psError(PS_ERR_UNKNOWN, false,
    5067                "failed to change state for chip_id %" PRId64, chip_id);
Note: See TracChangeset for help on using the changeset viewer.