IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jul 22, 2008, 9:10:30 AM (18 years ago)
Author:
eugene
Message:

changing state from old values (run, stop) to new set (new, full, cleaned, etc); using pxIsValidState where possible

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branch_20080719/ippTools/src/stacktool.c

    r18643 r18659  
    278278
    279279        // create a new stackRun for this stack
    280         stackRunRow *run = stackRunRowAlloc(0, "run", workdir, NULL, registered, skycell_id, tess_id, filter);
     280        stackRunRow *run = stackRunRowAlloc(
     281            0,                          // ID
     282            "new",                      // state
     283            workdir,
     284            NULL,                       // workdir_state
     285            registered,
     286            skycell_id,
     287            tess_id,
     288            filter);
     289
    281290        if (!stackRunInsertObject(config->dbh, run)) {
    282291            if (!psDBRollback(config->dbh)) {
     
    363372    }
    364373
    365     stackRunRow *run = stackRunRowAlloc(0, "run", workdir, NULL, registered, skycell_id, tess_id, filter);
     374    stackRunRow *run = stackRunRowAlloc(
     375        0,                              // ID
     376        "new",                          // state
     377        workdir,
     378        NULL,                           // workdir_state
     379        registered,
     380        skycell_id,
     381        tess_id,
     382        filter);
     383
    366384    if (!run) {
    367385        psError(PS_ERR_UNKNOWN, false, "failed to alloc stackRun object");
     
    656674    }
    657675
    658     if (!setstackRunState(config, stack_id, "stop")) {
     676    if (!setstackRunState(config, stack_id, "full")) {
    659677        if (!psDBRollback(config->dbh)) {
    660678            psError(PS_ERR_UNKNOWN, false, "database error");
     
    788806
    789807    // check that state is a valid string value
    790     if (!(
    791             (strncmp(state, "run", 4) == 0)
    792             || (strncmp(state, "stop", 5) == 0)
    793             || (strncmp(state, "reg", 4) == 0)
    794         )
    795     ) {
    796         psError(PS_ERR_UNKNOWN, false,
    797                 "invalid warpRun state: %s", state);
     808    if (!pxIsValidState(state)) {
     809        psError(PS_ERR_UNKNOWN, false, "invalid stackRun state: %s", state);
    798810        return false;
    799811    }
Note: See TracChangeset for help on using the changeset viewer.