(file) Return to cimserver.cpp CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Server

Diff for /pegasus/src/Server/cimserver.cpp between version 1.37 and 1.38

version 1.37, 2001/12/24 03:11:33 version 1.38, 2002/02/13 19:11:32
Line 30 
Line 30 
 // //
 // Modified By: Jenny Yu (jenny_yu@hp.com) // Modified By: Jenny Yu (jenny_yu@hp.com)
 // //
   // Modified By: Sushma Fernandes (sushma_fernandes@hp.com)
   //
 //%///////////////////////////////////////////////////////////////////////////// //%/////////////////////////////////////////////////////////////////////////////
  
  
Line 88 
Line 90 
 #include <Pegasus/Client/CIMClient.h> #include <Pegasus/Client/CIMClient.h>
 #include <Pegasus/Common/HTTPConnector.h> #include <Pegasus/Common/HTTPConnector.h>
 #include <Pegasus/Server/ShutdownService.h> #include <Pegasus/Server/ShutdownService.h>
   #include <Pegasus/Common/Destroyer.h>
 #ifndef PEGASUS_OS_ZOS #ifndef PEGASUS_OS_ZOS
 #include <slp/slp.h> #include <slp/slp.h>
 #endif #endif
Line 135 
Line 138 
  
 ConfigManager*    configManager; ConfigManager*    configManager;
  
 void GetEnvironmentVariables(  
     const char* arg0,  
     String& pegasusHome)  
 {  
     // Get environment variables:  
   
     const char* tmp = getenv("PEGASUS_HOME");  
   
     if (!tmp)  
     {  
         cerr << arg0 << ": PEGASUS_HOME environment variable undefined" << endl;  
         exit(1);  
     }  
   
     pegasusHome = tmp;  
     FileSystem::translateSlashes(pegasusHome);  
 }  
   
 void SetEnvironmentVariables(  
     const char* arg0)  
 {  
     cout << "PEGASUS_HOME is now " << arg0 << endl;  
   
     String str = "PEGASUS_HOME=";  
     str += arg0;  
     char* tmp = str.allocateCString();  
     putenv(tmp);  
   
     // Note: don't delete tmp! putenv() uses it.  
 }  
   
 /** GetOptions function - This function defines the Options Table /** GetOptions function - This function defines the Options Table
     and sets up the options from that table using the config manager.     and sets up the options from that table using the config manager.
 */ */
Line 175 
Line 147 
     char** argv,     char** argv,
     const String& pegasusHome)     const String& pegasusHome)
 { {
     String currentFile = pegasusHome + "/" + CURRENT_CONFIG_FILE;  
     String plannedFile = pegasusHome + "/" + PLANNED_CONFIG_FILE;  
   
     try     try
     {     {
         cm->mergeConfigFiles(currentFile, plannedFile);          cm->mergeConfigFiles();
  
         cm->mergeCommandLine(argc, argv);         cm->mergeCommandLine(argc, argv);
     }     }
Line 240 
Line 209 
  
     usage.append ("  configProperty=value\n");     usage.append ("  configProperty=value\n");
     usage.append ("    port=nnnn            - sets port number to listen on\n");     usage.append ("    port=nnnn            - sets port number to listen on\n");
     usage.append ("    home=/pegasus/bin    - sets pegasus home directory\n");  
     usage.append ("    logdir=/pegasus/logs - directory for log files\n");     usage.append ("    logdir=/pegasus/logs - directory for log files\n");
  
     cout << endl;     cout << endl;
Line 361 
Line 329 
     String  timeoutStr  = String::EMPTY;     String  timeoutStr  = String::EMPTY;
     long timeoutValue  = 0;     long timeoutValue  = 0;
  
       //
       // Get environment variables:
       //
       const char* tmp = getenv("PEGASUS_HOME");
   
       if (tmp)
       {
           pegasusHome = tmp;
       }
   
       FileSystem::translateSlashes(pegasusHome);
   
     // on Windows NT if there are no command-line options, run as a service     // on Windows NT if there are no command-line options, run as a service
  
     if (argc == 1 )     if (argc == 1 )
Line 402 
Line 382 
                     if (i + 1 < argc)                     if (i + 1 < argc)
                     {                     {
                         pegasusHome.assign(argv[i + 1]);                         pegasusHome.assign(argv[i + 1]);
                         SetEnvironmentVariables(argv[i + 1]);  
                     }                     }
                     else                     else
                     {                     {
Line 514 
Line 493 
         }         }
     }     }
  
     if (pegasusHome.size() == 0)      //
         GetEnvironmentVariables(argv[0], pegasusHome);      // Set the value for pegasusHome property
       //
       ConfigManager::setPegasusHome(pegasusHome);
  
     //     //
     // Get an instance of the Config Manager.     // Get an instance of the Config Manager.
Line 590 
Line 571 
         // ATTN-KS: create String based directory functions.         // ATTN-KS: create String based directory functions.
  
         logsDirectory = configManager->getCurrentValue("logdir");         logsDirectory = configManager->getCurrentValue("logdir");
           logsDirectory =
               ConfigManager::getHomedPath(configManager->getCurrentValue("logdir"));
  
         // Set up the Logger. This does not open the logs         // Set up the Logger. This does not open the logs
         // Might be more logical to clean before set.         // Might be more logical to clean before set.
Line 708 
Line 691 
 #endif #endif
  
         Monitor monitor;         Monitor monitor;
         CIMServer server(&monitor, pegasusHome, useSSL);          CIMServer server(&monitor, useSSL);
  
         // bind throws an exception of the bind fails         // bind throws an exception of the bind fails
         cout << "Binding to " << address << endl;         cout << "Binding to " << address << endl;


Legend:
Removed from v.1.37  
changed lines
  Added in v.1.38

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2