Changeset 17874
- Timestamp:
- May 30, 2008, 5:19:49 PM (18 years ago)
- Location:
- trunk/psModules/src
- Files:
-
- 3 edited
-
concepts/pmConcepts.c (modified) (2 diffs)
-
concepts/pmConceptsRead.c (modified) (1 diff)
-
config/pmConfig.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/concepts/pmConcepts.c
r17867 r17874 1226 1226 replace[0] = '{'; \ 1227 1227 strcpy(replace + 1, concept); \ 1228 strcpy(replace + length + 1, "}"); \1228 strcpy(replace + length, "}"); \ 1229 1229 \ 1230 1230 psTrace("psModules.concepts", 10, "Interpolating concept %s for %s", replace, value); \ … … 1259 1259 char concept[length]; // Name of concept 1260 1260 strncpy(concept, start + 1, length - 1); 1261 concept[length ] = '\0';1261 concept[length - 1] = '\0'; 1262 1262 1263 1263 psTrace("psModules.concepts", 7, "Interpolating concept %s", concept); -
trunk/psModules/src/concepts/pmConceptsRead.c
r17868 r17874 373 373 } 374 374 375 // XXX --- the below code has NOT been tested!376 375 bool p_pmConceptsReadFromDatabase(psMetadata *target, const psMetadata *specs, 377 376 const pmFPA *fpa, const pmChip *chip, const pmCell *cell, psDB *db) -
trunk/psModules/src/config/pmConfig.c
r17548 r17874 880 880 } 881 881 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 } 882 891 883 892 psErrorClear(); // we may have failed to find some items in the metadata … … 1344 1353 } 1345 1354 1346 // no files found: this is not really an error 1355 // no files found: this is not really an error 1347 1356 if (files->n == 0) { 1348 1357 psFree (files); … … 1553 1562 psMetadata *scheme = psMetadataLookupMetadata(&mdok, fitstypes, fitsType); 1554 1563 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; 1557 1566 } 1558 1567 1559 1568 return scheme; 1560 1569 } 1570 1571 1572 #if 0 1573 bool 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.
