IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 26969


Ignore:
Timestamp:
Feb 16, 2010, 5:34:49 PM (16 years ago)
Author:
watersc1
Message:

Added dbCommit statement, and confirmed that it will not requeue an identical run.

File:
1 edited

Legend:

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

    r26958 r26969  
    19651965  }
    19661966
     1967  psArray *list = psArrayAllocEmpty(16); // List of runs defined, to print
    19671968  for (long i = 0; i < output->n; i++) {
    19681969    psMetadata *row = output->data[i]; // Output row from query
     
    20522053      return false;
    20532054    }
    2054     //    diffRunPrintObject(stdout,run,1);
     2055/*     diffRunPrintObject(stdout,run,1); */
    20552056    run->diff_id = psDBLastInsertID(config->dbh);
    20562057    for (long j = 0; j < diff_id_output->n; j++) {
     
    20822083      }
    20832084
    2084       //      diffInputSkyfilePrintObject(stdout,input,1);
     2085/*       diffInputSkyfilePrintObject(stdout,input,1); */
    20852086      psFree(input);
    20862087    }
     
    20922093        psFree(diffQuery);
    20932094        psFree(run);
     2095        psFree(list);
    20942096        if (!psDBRollback(config->dbh)) {
    20952097            psError(PS_ERR_UNKNOWN, false, "database error");
     
    20972099        return false;
    20982100    }
    2099 
     2101    psArrayAdd(list, list->n, run);
    21002102    psFree(run);
    21012103  }
     2104
     2105  if (!psDBCommit(config->dbh)) {
     2106    psError(PS_ERR_UNKNOWN, false, "database error");
     2107    psFree(list);
     2108    return false;
     2109  }
     2110 
     2111  if (!diffRunPrintObjects(stdout, list, !simple)) {
     2112    psError(PS_ERR_UNKNOWN, false, "failed to print object");
     2113    psFree(list);
     2114    return false;
     2115  }
     2116 
    21022117  psFree(query);
    21032118  psFree(stack1Query);
     
    21052120  psFree(diffQuery);
    21062121  psFree(output);
     2122  psFree(list);
    21072123
    21082124  return(true);
Note: See TracChangeset for help on using the changeset viewer.