IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 30, 2008, 5:19:49 PM (18 years ago)
Author:
Paul Price
Message:

Finally finished and tested code to get concepts from the database.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/config/pmConfig.c

    r17548 r17874  
    880880    }
    881881
     882    if (!config->database) {
     883        psDB *dbh = pmConfigDB(config); // Database handle
     884        if (!dbh) {
     885            psError(PS_ERR_UNKNOWN, false, "Unable to open database connection.");
     886            psFree(config);
     887            return NULL;
     888        }
     889        config->database = dbh;
     890    }
    882891
    883892    psErrorClear();   // we may have failed to find some items in the metadata
     
    13441353    }
    13451354
    1346     // no files found: this is not really an error 
     1355    // no files found: this is not really an error
    13471356    if (files->n == 0) {
    13481357        psFree (files);
     
    15531562    psMetadata *scheme = psMetadataLookupMetadata(&mdok, fitstypes, fitsType);
    15541563    if (!scheme) {
    1555         psWarning("Unable to find specified FITS Type %s in camera configuration.", fitsType);
    1556         return NULL;
     1564        psWarning("Unable to find specified FITS Type %s in camera configuration.", fitsType);
     1565        return NULL;
    15571566    }
    15581567
    15591568    return scheme;
    15601569}
     1570
     1571
     1572#if 0
     1573bool pmConfigDump(const pmConfig *config, const pmFPA *source, const char *outroot)
     1574{
     1575    PS_ASSERT_PTR_NON_NULL(config, false);
     1576    PS_ASSERT_STRING_NON_EMPTY(outroot, false);
     1577
     1578    pmFPAview *view = source ? pmFPAviewTop(source) : pmFPAviewAlloc(0);// View to top level
     1579    if (!view) {
     1580        psError(PS_ERR_UNKNOWN, false, "Unable to determine top view for FPA.");
     1581        return false;
     1582    }
     1583
     1584    psMetadata *dumpRules = psMetadataLookupMetadata(NULL, config->system, "CONFIG.RULES"); // Name rules
     1585    if (!dumpRules) {
     1586        psError(PS_ERR_UNKNOWN, false, "Unable to find CONFIG.RULES in system configuration");
     1587        psFree(view);
     1588        return false;
     1589    }
     1590
     1591    const char *name =
     1592#endif
Note: See TracChangeset for help on using the changeset viewer.