IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 4, 2011, 2:20:59 PM (15 years ago)
Author:
watersc1
Message:

Fixed segfault in laptool -updaterun (expected state to always be defined, but that's not true). Final touches on lap_science.pl to have consistent counts and error messages.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/czw_branch/20110406/ippTools/src/laptool.c

    r31429 r31430  
    460460  if (rows) {
    461461    // We're done with these exposures now, so mark them as inactive.
    462     if ((strcmp(state,"drop") == 0)||
    463         (strcmp(state,"full") == 0)) {
    464       values = psMetadataAlloc();
    465       psMetadataAddBool(values, PS_LIST_TAIL, "active", 0, "", false);
    466       long exps = psDBUpdateRows(config->dbh, "lapExp", where, values);
    467 
    468       if (exps) {
    469         return(true);
    470       }
    471       else {
    472         return(true); // We shouldn't really fail if we didn't change anything. Maybe there's nothing to change.
     462    if (state) {
     463      if ((strcmp(state,"drop") == 0)||
     464          (strcmp(state,"full") == 0)) {
     465        values = psMetadataAlloc();
     466        psMetadataAddBool(values, PS_LIST_TAIL, "active", 0, "", false);
     467        long exps = psDBUpdateRows(config->dbh, "lapExp", where, values);
     468       
     469        if (exps) {
     470          return(true);
     471        }
     472        else {
     473          return(true); // We shouldn't really fail if we didn't change anything. Maybe there's nothing to change.
     474        }
    473475      }
    474476    }
Note: See TracChangeset for help on using the changeset viewer.