(file) Return to Config.c CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Executor

Diff for /pegasus/src/Executor/Config.c between version 1.1.2.1 and 1.1.2.2

version 1.1.2.1, 2007/01/04 04:43:33 version 1.1.2.2, 2007/01/10 01:59:28
Line 42 
Line 42 
 /* /*
 **============================================================================== **==============================================================================
 ** **
   ** ConfigParameter
   **
   **     The _config[] array below defines default values for the
   **     various configuration items.
   **
   **==============================================================================
   */
   
   struct ConfigParameter
   {
       const char* name;
       const char* value;
   };
   
   static struct ConfigParameter _config[] =
   {
   #include <Pegasus/Config/FixedPropertyTable.h>
   };
   
   static size_t _configSize =
       sizeof(_config) / sizeof(_config[0]);
   
   /*
   **==============================================================================
   **
 ** GetConfigParamFromCommandLine() ** GetConfigParamFromCommandLine()
 ** **
 **     Attempt to find a command line configuratin parameter of the form **     Attempt to find a command line configuratin parameter of the form
Line 156 
Line 181 
     char value[EXECUTOR_BUFFER_SIZE])     char value[EXECUTOR_BUFFER_SIZE])
 { {
     char path[EXECUTOR_BUFFER_SIZE];     char path[EXECUTOR_BUFFER_SIZE];
       size_t i;
  
     /* (1) First check command line. */     /* (1) First check command line. */
  
     if (GetConfigParamFromCommandLine(argc, argv, name, value) == 0)     if (GetConfigParamFromCommandLine(argc, argv, name, value) == 0)
         return 0;         return 0;
  
     /* (2) Next check config file. */      /* (2) Next check planned config file. */
   
  
     if (GetHomedPath(PEGASUS_PLANNED_CONFIG_FILE_PATH, path) == 0 &&     if (GetHomedPath(PEGASUS_PLANNED_CONFIG_FILE_PATH, path) == 0 &&
         GetConfigParamFromFile(path, name, value) == 0)         GetConfigParamFromFile(path, name, value) == 0)
         return 0;         return 0;
  
       /* (3) Finally check the default configuration table. */
   
       for (i = 0; i < _configSize; i++)
       {
           if (strcmp(_config[i].name, name) == 0)
           {
               Strlcpy(value, _config[i].value, EXECUTOR_BUFFER_SIZE);
               return 0;
           }
       }
   
     /* Not found! */     /* Not found! */
     return -1;     return -1;
 } }


Legend:
Removed from v.1.1.2.1  
changed lines
  Added in v.1.1.2.2

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2