Changeset 7589 for trunk/psModules/src/config/pmConfig.c
- Timestamp:
- Jun 16, 2006, 3:50:43 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/psModules/src/config/pmConfig.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/config/pmConfig.c
r7576 r7589 3 3 * @author PAP, IfA 4 4 * 5 * @version $Revision: 1.2 3$ $Name: not supported by cvs2svn $6 * @date $Date: 2006-06-1 5 02:24:19$5 * @version $Revision: 1.24 $ $Name: not supported by cvs2svn $ 6 * @date $Date: 2006-06-17 01:50:43 $ 7 7 * 8 8 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 332 332 // XXX: Only stdout and stderr are provided for now; this section should be 333 333 // expanded in the future to do files, and perhaps even sockets. 334 if (! !psLogSetDestination(psMessageDestination(argv[argNum]))) {334 if (!psLogSetDestination(psMessageDestination(logDest))) { 335 335 psLogMsg(__func__, PS_LOG_WARN, "Unable to set log destination to %s\n", argv[argNum]); 336 336 } … … 546 546 } 547 547 return format; 548 } 549 550 // Work out what camera we have, based on the FITS header and a set of rules specified in the IPP 551 // configuration; return the camera configuration and format 552 psMetadata *pmConfigCameraByName( 553 pmConfig *config, // The configuration 554 const char *cameraName // The camera name header 555 ) 556 { 557 PS_ASSERT_PTR_NON_NULL(cameraName, NULL); 558 PS_ASSERT_PTR_NON_NULL(config, NULL); 559 560 psMetadata *cameras = psMetadataLookupMD(NULL, config->site, "CAMERAS"); 561 if (!cameras) { 562 psError(PS_ERR_IO, true, "Unable to find CAMERAS in the configuration."); 563 return NULL; 564 } 565 566 char *cameraPath = psMetadataLookupStr(NULL, cameras, cameraName); 567 if (!cameraPath) { 568 psError(PS_ERR_IO, true, "Unable to find requested CAMERA in the configuration."); 569 return NULL; 570 } 571 572 psMetadata *camera = NULL; // Camera to test against what we've got: 573 574 if (!readConfig(&camera, cameraPath, cameraName)) { 575 psLogMsg(__func__, PS_LOG_WARN, "Trouble reading reading camera configuration %s", cameraName); 576 psFree(camera); 577 return NULL; 578 } 579 580 return camera; 548 581 } 549 582
Note:
See TracChangeset
for help on using the changeset viewer.
