IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 16150


Ignore:
Timestamp:
Jan 18, 2008, 4:21:32 PM (18 years ago)
Author:
jhoblitt
Message:

fix addprocessedexpMode() to correctly carry through default values

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/end_stage/ippTools/src/regtool.c

    r16148 r16150  
    621621    psFree(output);
    622622
     623    // carry through these values
     624    // new CLI options overwrite existing values
     625    workdir   = workdir ? workdir : newExp->workdir;
     626    reduction = reduction ? reduction : newExp->reduction;
     627    dvodb     = dvodb ? dvodb : newExp->dvodb;
     628    tess_id   = tess_id ? tess_id : newExp->tess_id;
     629    end_stage = end_stage ? end_stage : newExp->end_stage;
     630
     631    psFree(newExp);
     632
    623633    if (!rawExpInsert(config->dbh,
    624634        (psS64)atoll(exp_id),
     
    630640        exp_type,
    631641        filelevel,
    632         workdir ? workdir : newExp->workdir,
    633         reduction ? reduction : newExp->reduction,
    634         dvodb ? dvodb : newExp->dvodb,
    635         tess_id ? tess_id : newExp->tess_id,
    636         end_stage ? end_stage : newExp->end_stage,
     642        workdir,
     643        reduction,
     644        dvodb,
     645        tess_id,
     646        end_stage,
    637647        filter,
    638648        comment,
     
    684694        }
    685695        psError(PS_ERR_UNKNOWN, false, "database error");
    686         psFree(newExp);
    687696        return false;
    688697    }
     
    695704        }
    696705        psError(PS_ERR_UNKNOWN, false, "failed to change newExp.state for exp_id: %s", exp_id);
    697         psFree(newExp);
    698706        return false;
    699707    }
     
    704712    // this can only be run as the newExp's state has been set to stop
    705713    if (!pxchipQueueByExpTag(config,
    706                 newExp->exp_id,
    707                 newExp->workdir,
     714                (psS64)atoll(exp_id),
     715                workdir,
    708716                NULL, // label
    709                 newExp->reduction,
     717                reduction,
    710718                NULL, // expgroup
    711719                dvodb,
     
    718726        }
    719727        psError(PS_ERR_UNKNOWN, false, "failed to queue chipPendingExp");
    720         psFree(newExp);
    721         return false;
    722     }
    723     psFree(newExp);
     728        return false;
     729    }
    724730
    725731    if (!psDBCommit(config->dbh)) {
Note: See TracChangeset for help on using the changeset viewer.