IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 18681


Ignore:
Timestamp:
Jul 23, 2008, 1:16:12 PM (18 years ago)
Author:
Paul Price
Message:

Print defined runs as a single metadata, not a bunch of discrete ones (confuses pantasks).

File:
1 edited

Legend:

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

    r18671 r18681  
    235235    psString insert = pxDataGet("magictool_definebyquery_insert.sql"); // Insert query
    236236
    237     // iterate over array of grouped warp_ids
     237    psArray *list = psArrayAllocEmpty(16); // List of runs, to print
    238238    for (long i = 0; i < psArrayLength(output); i++) {
    239239        psMetadata *row = output->data[i]; // Row of interest
     
    251251            psFree(insert);
    252252            psFree(output);
     253            psFree(list);
    253254            if (!psDBRollback(config->dbh)) {
    254255                psError(PS_ERR_UNKNOWN, false, "database error");
     
    260261        run->magic_id = magic_id;
    261262
    262         if (!magicRunPrintObject(stdout, run, !simple)) {
    263             psError(PS_ERR_UNKNOWN, false, "failed to print object");
    264             psFree(run);
    265             psFree(insert);
    266             psFree(output);
    267             if (!psDBRollback(config->dbh)) {
    268                 psError(PS_ERR_UNKNOWN, false, "database error");
    269             }
    270             return false;
    271         }
     263        psArrayAdd(list, list->n, run);
    272264        psFree(run);
    273265
     
    284276            psFree(insert);
    285277            psFree(output);
     278            psFree(list);
    286279            if (!psDBRollback(config->dbh)) {
    287280                psError(PS_ERR_UNKNOWN, false, "database error");
     
    297290    }
    298291    psFree(output);
     292
     293    if (!magicRunPrintObjects(stdout, list, !simple)) {
     294        psError(PS_ERR_UNKNOWN, false, "failed to print object");
     295        psFree(list);
     296        return false;
     297    }
    299298
    300299    return true;
Note: See TracChangeset for help on using the changeset viewer.