IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Sep 24, 2007, 6:18:00 PM (19 years ago)
Author:
jhoblitt
Message:

update magicInputSkyfile

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippdb/src/ippdb.c

    r14598 r15003  
    1929319293static void magicInputSkyfileRowFree(magicInputSkyfileRow *object);
    1929419294
    19295 magicInputSkyfileRow *magicInputSkyfileRowAlloc(psS64 magic_id, psS64 diff_id, psS32 node)
     19295magicInputSkyfileRow *magicInputSkyfileRowAlloc(psS64 magic_id, psS64 diff_id, const char *node)
    1929619296{
    1929719297    magicInputSkyfileRow *_object;
     
    1930219302    _object->magic_id = magic_id;
    1930319303    _object->diff_id = diff_id;
    19304     _object->node = node;
     19304    _object->node = psStringCopy(node);
    1930519305
    1930619306    return _object;
     
    1930919309static void magicInputSkyfileRowFree(magicInputSkyfileRow *object)
    1931019310{
     19311    psFree(object->node);
    1931119312}
    1931219313
     
    1932419325        return false;
    1932519326    }
    19326     if (!psMetadataAdd(md, PS_LIST_TAIL, "node", PS_DATA_S32, "AUTO_INCREMENT INDEX(magic_id, node)", 0)) {
     19327    if (!psMetadataAdd(md, PS_LIST_TAIL, "node", PS_DATA_STRING, "INDEX(magic_id, node)", "64")) {
    1932719328        psError(PS_ERR_UNKNOWN, false, "failed to add item node");
    1932819329        psFree(md);
     
    1934219343}
    1934319344
    19344 bool magicInputSkyfileInsert(psDB * dbh, psS64 magic_id, psS64 diff_id, psS32 node)
     19345bool magicInputSkyfileInsert(psDB * dbh, psS64 magic_id, psS64 diff_id, const char *node)
    1934519346{
    1934619347    psMetadata *md = psMetadataAlloc();
     
    1935519356        return false;
    1935619357    }
    19357     if (!psMetadataAdd(md, PS_LIST_TAIL, "node", PS_DATA_S32, NULL, node)) {
     19358    if (!psMetadataAdd(md, PS_LIST_TAIL, "node", PS_DATA_STRING, NULL, node)) {
    1935819359        psError(PS_ERR_UNKNOWN, false, "failed to add item node");
    1935919360        psFree(md);
     
    1946619467        return false;
    1946719468    }
    19468     if (!psMetadataAdd(md, PS_LIST_TAIL, "node", PS_DATA_S32, NULL, object->node)) {
     19469    if (!psMetadataAdd(md, PS_LIST_TAIL, "node", PS_DATA_STRING, NULL, object->node)) {
    1946919470        psError(PS_ERR_UNKNOWN, false, "failed to add item node");
    1947019471        psFree(md);
     
    1949019491        return false;
    1949119492    }
    19492     psS32 node = psMetadataLookupS32(&status, md, "node");
     19493    char* node = psMetadataLookupPtr(&status, md, "node");
    1949319494    if (!status) {
    1949419495        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item node");
Note: See TracChangeset for help on using the changeset viewer.