Changeset 5516 for trunk/psModules/src/config/pmConfig.c
- Timestamp:
- Nov 15, 2005, 10:09:03 AM (20 years ago)
- File:
-
- 1 edited
-
trunk/psModules/src/config/pmConfig.c (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/config/pmConfig.c
r5435 r5516 3 3 * @author PAP, IfA 4 4 * 5 * @version $Revision: 1. 3$ $Name: not supported by cvs2svn $6 * @date $Date: 2005-1 0-20 23:06:24$5 * @version $Revision: 1.4 $ $Name: not supported by cvs2svn $ 6 * @date $Date: 2005-11-15 20:09:03 $ 7 7 * 8 8 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 11 11 #include <stdio.h> 12 12 #include <string.h> 13 #include <assert.h>14 13 #include "pslib.h" 15 //#include "psAdditionals.h"16 14 #include "pmConfig.h" 17 15 18 16 #define PS_SITE "PS_SITE" // Name of the environment variable containing the site config file 19 #define PS_DEFAULT_SITE "ipprc.config" // Default site config file 20 21 17 #define PS_DEFAULT_SITE "ipprc.config" // Default site config file 22 18 23 19 /** readConfig … … 32 28 const char *description) // Description of file 33 29 { 34 int numBadLines = 0; // Number of bad lines in config file 30 int numBadLines = 0; 31 35 32 psLogMsg(__func__, PS_LOG_INFO, "Loading %s configuration from file %s\n", 36 33 description, name); … … 56 53 must take precedence override the values set here. This must be, somehow, 57 54 coded. 55 56 XXX: Must load camera and recipe configuration if specified in the command line. 58 57 *****************************************************************************/ 59 58 bool pmConfigRead( … … 119 118 // file and store in psMetadata struct site. 120 119 // 120 121 121 if (!readConfig(site, siteName, "site")) { 122 122 return false; … … 249 249 } 250 250 251 // 252 // Allow command line options to override defaults for logging. 253 // XXX: Is it appropriate to use the ArgVerbosity function for this? 254 // A: it removes the options from the command line. 255 // B: will the pmConfigRead function always be called on initialization. 256 // 257 psS32 saveLogLevel = psLogGetLevel(); 258 psArgumentVerbosity(argc, argv); 259 // XXX: substitute the string for the default log level for "2". 260 if (2 == psLogGetLevel()) { 261 psLogSetLevel(saveLogLevel); 262 } 251 263 return(true); 252 264 } … … 266 278 // Apply the rules 267 279 psMetadataIterator *ruleIter = psMetadataIteratorAlloc(rule, PS_LIST_HEAD, NULL); // Rule iterator 268 psMetadataItem *ruleItem = NULL; // Item from the metadata269 bool match = true; // Does it match?280 psMetadataItem *ruleItem = NULL; // Item from the metadata 281 bool match = true; // Does it match? 270 282 while ((ruleItem = psMetadataGetAndIncrement(ruleIter)) && match) { 271 283 // Check for the existence of the rule … … 389 401 const char *recipeName) 390 402 { 391 assert(camera);392 assert(recipeName);393 394 psMetadata *recipe = NULL; // Recipe to read395 bool mdok = true; // Status of MD lookup403 PS_ASSERT_PTR_NON_NULL(camera, false); 404 PS_ASSERT_PTR_NON_NULL(recipeName, false); 405 406 psMetadata *recipe = NULL; // Recipe to read 407 bool mdok = true; // Status of MD lookup 396 408 psMetadata *recipes = psMetadataLookupMD(&mdok, camera, "RECIPES"); // The list of recipes 397 409 if (! mdok || ! recipes) {
Note:
See TracChangeset
for help on using the changeset viewer.
