IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 29, 2008, 3:02:07 PM (18 years ago)
Author:
eugene
Message:

merge updates from cleanup branch

File:
1 edited

Legend:

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

    r17161 r18366  
    3535
    3636    // check that state is a valid string value
    37     if (!(
    38             (strncmp(state, "run", 4) == 0)
    39             || (strncmp(state, "stop", 5) == 0)
    40             || (strncmp(state, "reg", 4) == 0)
    41         )
    42     ) {
    43         psError(PS_ERR_UNKNOWN, false,
    44                 "invalid chipRun state: %s", state);
     37    if (!pxIsValidState(state)) {
     38        psError(PS_ERR_UNKNOWN, false, "invalid chipRun state: %s", state);
    4539        return false;
    4640    }
     
    6357
    6458    // check that state is a valid string value
    65     if (!(
    66             (strncmp(state, "run", 4) == 0)
    67             || (strncmp(state, "stop", 5) == 0)
    68             || (strncmp(state, "reg", 4) == 0)
    69         )
    70     ) {
    71         psError(PS_ERR_UNKNOWN, false,
    72                 "invalid chipRun state: %s", state);
     59    if (!pxIsValidState(state)) {
     60        psError(PS_ERR_UNKNOWN, false, "invalid chipRun state: %s", state);
    7361        return false;
    7462    }
     63
    7564
    7665    psString query = psStringCopy("UPDATE chipRun JOIN rawExp USING(exp_id) SET state = '%s'");
     
    151140            0x0, // chip_id
    152141            exp_id,
    153             "run",      // state               
     142            "new",      // state               
    154143            workdir,
    155144            "dirty",    // workdir_state
     
    167156    return psDBLastInsertID(config->dbh);
    168157}
     158
Note: See TracChangeset for help on using the changeset viewer.