IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 18796


Ignore:
Timestamp:
Jul 30, 2008, 2:59:09 PM (18 years ago)
Author:
Paul Price
Message:

Incrementing to version 1.1.39 in preparation for IPP 2.6 release

Location:
trunk/ippdb
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippdb/configure.ac

    r17878 r18796  
    77AC_PREREQ(2.61)
    88
    9 AC_INIT([ippdb], [1.1.38], [pan-starrs.ifa.hawaii.edu])
     9AC_INIT([ippdb], [1.1.39], [pan-starrs.ifa.hawaii.edu])
    1010AC_CONFIG_SRCDIR([ippdb.pc.in])
    1111
  • trunk/ippdb/src/ippdb.c

    r18595 r18796  
    2305323053static void magicRunRowFree(magicRunRow *object);
    2305423054
    23055 magicRunRow *magicRunRowAlloc(psS64 magic_id, const char *state, const char *workdir, const char *workdir_state, const char *label, const char *dvodb, psTime* registered, psS16 fault)
     23055magicRunRow *magicRunRowAlloc(psS64 magic_id, psS64 exp_id, const char *state, const char *workdir, const char *workdir_state, const char *label, const char *dvodb, psTime* registered, psS16 fault)
    2305623056{
    2305723057    magicRunRow     *_object;
     
    2306123061
    2306223062    _object->magic_id = magic_id;
     23063    _object->exp_id = exp_id;
    2306323064    _object->state = psStringCopy(state);
    2306423065    _object->workdir = psStringCopy(workdir);
     
    2309023091        return false;
    2309123092    }
     23093    if (!psMetadataAdd(md, PS_LIST_TAIL, "exp_id", PS_DATA_S64, "Key", 0)) {
     23094        psError(PS_ERR_UNKNOWN, false, "failed to add item exp_id");
     23095        psFree(md);
     23096        return false;
     23097    }
    2309223098    if (!psMetadataAdd(md, PS_LIST_TAIL, "state", PS_DATA_STRING, "Key", "64")) {
    2309323099        psError(PS_ERR_UNKNOWN, false, "failed to add item state");
     
    2313823144}
    2313923145
    23140 bool magicRunInsert(psDB * dbh, psS64 magic_id, const char *state, const char *workdir, const char *workdir_state, const char *label, const char *dvodb, psTime* registered, psS16 fault)
     23146bool magicRunInsert(psDB * dbh, psS64 magic_id, psS64 exp_id, const char *state, const char *workdir, const char *workdir_state, const char *label, const char *dvodb, psTime* registered, psS16 fault)
    2314123147{
    2314223148    psMetadata *md = psMetadataAlloc();
    2314323149    if (!psMetadataAdd(md, PS_LIST_TAIL, "magic_id", PS_DATA_S64, NULL, magic_id)) {
    2314423150        psError(PS_ERR_UNKNOWN, false, "failed to add item magic_id");
     23151        psFree(md);
     23152        return false;
     23153    }
     23154    if (!psMetadataAdd(md, PS_LIST_TAIL, "exp_id", PS_DATA_S64, NULL, exp_id)) {
     23155        psError(PS_ERR_UNKNOWN, false, "failed to add item exp_id");
    2314523156        psFree(md);
    2314623157        return false;
     
    2320423215bool magicRunInsertObject(psDB *dbh, magicRunRow *object)
    2320523216{
    23206     return magicRunInsert(dbh, object->magic_id, object->state, object->workdir, object->workdir_state, object->label, object->dvodb, object->registered, object->fault);
     23217    return magicRunInsert(dbh, object->magic_id, object->exp_id, object->state, object->workdir, object->workdir_state, object->label, object->dvodb, object->registered, object->fault);
    2320723218}
    2320823219
     
    2328223293        return false;
    2328323294    }
     23295    if (!psMetadataAdd(md, PS_LIST_TAIL, "exp_id", PS_DATA_S64, NULL, object->exp_id)) {
     23296        psError(PS_ERR_UNKNOWN, false, "failed to add item exp_id");
     23297        psFree(md);
     23298        return false;
     23299    }
    2328423300    if (!psMetadataAdd(md, PS_LIST_TAIL, "state", PS_DATA_STRING, NULL, object->state)) {
    2328523301        psError(PS_ERR_UNKNOWN, false, "failed to add item state");
     
    2333123347        return false;
    2333223348    }
     23349    psS64 exp_id = psMetadataLookupS64(&status, md, "exp_id");
     23350    if (!status) {
     23351        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item exp_id");
     23352        return false;
     23353    }
    2333323354    char* state = psMetadataLookupPtr(&status, md, "state");
    2333423355    if (!status) {
     
    2336723388    }
    2336823389
    23369     return magicRunRowAlloc(magic_id, state, workdir, workdir_state, label, dvodb, registered, fault);
     23390    return magicRunRowAlloc(magic_id, exp_id, state, workdir, workdir_state, label, dvodb, registered, fault);
    2337023391}
    2337123392psArray *magicRunSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit)
  • trunk/ippdb/src/ippdb.h

    r18595 r18796  
    1002910029typedef struct {
    1003010030    psS64           magic_id;
     10031    psS64           exp_id;
    1003110032    char            *state;
    1003210033    char            *workdir;
     
    1004510046magicRunRow *magicRunRowAlloc(
    1004610047    psS64           magic_id,
     10048    psS64           exp_id,
    1004710049    const char      *state,
    1004810050    const char      *workdir,
     
    1008210084    psDB            *dbh,               ///< Database handle
    1008310085    psS64           magic_id,
     10086    psS64           exp_id,
    1008410087    const char      *state,
    1008510088    const char      *workdir,
  • trunk/ippdb/tests/alloc.c

    r18595 r18796  
    27362736        magicRunRow     *object;
    27372737
    2738         object = magicRunRowAlloc(-64, "a string", "a string", "a string", "a string", "a string", "0001-01-01T00:00:00Z", -16    );
     2738        object = magicRunRowAlloc(-64, -64, "a string", "a string", "a string", "a string", "a string", "0001-01-01T00:00:00Z", -16    );
    27392739
    27402740        if (!object) {
     
    27432743
    27442744        if (!object->magic_id == -64) {
     2745            psFree(object);
     2746            exit(EXIT_FAILURE);
     2747        }
     2748        if (!object->exp_id == -64) {
    27452749            psFree(object);
    27462750            exit(EXIT_FAILURE);
  • trunk/ippdb/tests/insert.c

    r18595 r18796  
    658658        }
    659659
    660         if (!magicRunInsert(dbh, -64, "a string", "a string", "a string", "a string", "a string", "0001-01-01T00:00:00Z", -16)) {
     660        if (!magicRunInsert(dbh, -64, -64, "a string", "a string", "a string", "a string", "a string", "0001-01-01T00:00:00Z", -16)) {
    661661            exit(EXIT_FAILURE);
    662662        }
  • trunk/ippdb/tests/insertobject.c

    r18595 r18796  
    960960        }
    961961
    962         object = magicRunRowAlloc(-64, "a string", "a string", "a string", "a string", "a string", "0001-01-01T00:00:00Z", -16);
     962        object = magicRunRowAlloc(-64, -64, "a string", "a string", "a string", "a string", "a string", "0001-01-01T00:00:00Z", -16);
    963963        if (!object) {
    964964            exit(EXIT_FAILURE);
  • trunk/ippdb/tests/metadatafromobject.c

    r18595 r18796  
    30073007        bool            status;
    30083008
    3009         object = magicRunRowAlloc(-64, "a string", "a string", "a string", "a string", "a string", "0001-01-01T00:00:00Z", -16);
     3009        object = magicRunRowAlloc(-64, -64, "a string", "a string", "a string", "a string", "a string", "0001-01-01T00:00:00Z", -16);
    30103010        if (!object) {
    30113011            exit(EXIT_FAILURE);
     
    30193019        psFree(object);
    30203020
     3021            psFree(md);
     3022            exit(EXIT_FAILURE);
     3023        }
    30213024            psFree(md);
    30223025            exit(EXIT_FAILURE);
  • trunk/ippdb/tests/objectfrommetadata.c

    r18595 r18796  
    49724972            exit(EXIT_FAILURE);
    49734973        }
     4974            psFree(md);
     4975            exit(EXIT_FAILURE);
     4976        }
    49744977        if (!psMetadataAddStr(md, PS_LIST_TAIL, "state", 0, NULL, "a string")) {
    49754978            psFree(md);
     
    50075010        psFree(md);
    50085011
     5012            psFree(object);
     5013            exit(EXIT_FAILURE);
     5014        }
    50095015            psFree(object);
    50105016            exit(EXIT_FAILURE);
Note: See TracChangeset for help on using the changeset viewer.