IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 11770


Ignore:
Timestamp:
Feb 13, 2007, 11:57:00 AM (19 years ago)
Author:
jhoblitt
Message:

make p4tool -addoverlap atomic

File:
1 edited

Legend:

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

    r11769 r11770  
    583583    }
    584584
     585    if (!psDBTransaction(config->dbh)) {
     586        psError(PS_ERR_UNKNOWN, false, "database error");
     587        return false;
     588    }
     589
    585590    if (!parseAndInsertSkyCellMap(config, mapfile)) {
     591        psError(PS_ERR_UNKNOWN, false, "failed to inject mapfile: %s into the database", mapfile);
     592        // rollback
     593        if (!psDBRollback(config->dbh)) {
     594            psError(PS_ERR_UNKNOWN, false, "database error");
     595        }
     596        return false;
     597    }
     598
     599    // point of no return
     600    if (!psDBCommit(config->dbh)) {
     601        psError(PS_ERR_UNKNOWN, false, "database error");
     602        return false;
    586603    }
    587604
     
    626643
    627644        if (!p4SkyCellMapInsertObject(config->dbh, row)) {
    628             psError(PS_ERR_UNKNOWN, false, "failed to convert mapfile: %s metdata entry into a p4SkyCellMap object", mapfile);
     645            psError(PS_ERR_UNKNOWN, false, "database error");
    629646            psFree(row);
    630647            psFree(iter);
Note: See TracChangeset for help on using the changeset viewer.