IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jul 2, 2007, 3:46:36 PM (19 years ago)
Author:
jhoblitt
Message:

refactor camtool & db to preserve metadata history

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/backtrack/ippTools/src/chiptool.c

    r13990 r13994  
    3030#include "pxtools.h"
    3131#include "pxdata.h"
     32
    3233#include "chiptool.h"
    3334#include "camtool.h"
     
    553554    }
    554555
     556
     557
    555558    // XXX I've decided to make the transaction cover the Exp migration as
    556559    // well.  Otherwise, if the last imfile in an exp is moved and the exp
     
    827830    }
    828831
    829     // insert into camPendingExp
    830832    for (long i = 0; i < psArrayLength(output); i++) {
    831833        psMetadata *row = output->data[i];
    832834
    833835        chipRunRow *chipRun = chipRunObjectFromMetadata(row);
    834 
    835         // camQueueChipID() can only be run after the chipProcessedExp entry
    836         // has been inserted.
    837         // queue the chip_id in the camPendingExp table
     836        // set chipRun.state to 'stop'
     837        if (!pxchipRunSetState(config, chipRun->chip_id, "stop")) {
     838            psError(PS_ERR_UNKNOWN, false, "failed to change chipRun.state for chip_id: %" PRId64, chipRun->chip_id);
     839            psFree(chipRun);
     840            psFree(output);
     841            return false;
     842        }
     843
     844        // camQueueChipID() can only be run after chipRun.state has been set to
     845        // stop
    838846        if (!camQueueChipID(config,
    839847                    chipRun->chip_id,
Note: See TracChangeset for help on using the changeset viewer.