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

Diff for /pegasus/src/Server/Attic/cimserver_os400.cpp between version 1.14 and 1.15

version 1.14, 2003/08/11 15:35:57 version 1.15, 2003/08/12 19:24:46
Line 38 
Line 38 
 #include <Pegasus/Common/Config.h> #include <Pegasus/Common/Config.h>
 #include <Pegasus/Common/String.h> #include <Pegasus/Common/String.h>
 #include <Pegasus/Common/Logger.h> #include <Pegasus/Common/Logger.h>
   #include "OS400ConvertChar.h"
 #include <Pegasus/Common/MessageLoader.h> //l10n #include <Pegasus/Common/MessageLoader.h> //l10n
 #include <except.h> #include <except.h>
  
Line 91 
Line 92 
 /////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////
 int cimserver_fork(void) int cimserver_fork(void)
 { {
   #pragma convert(37)
   char rc5[3] = "05"; // rc5 means the CIMOM Server failed to start   char rc5[3] = "05"; // rc5 means the CIMOM Server failed to start
   char cppServ[10] = "QYCMCIMOM";   char cppServ[10] = "QYCMCIMOM";
   ycmJob cppJob(YCMJOB_SRVNAME_10, YCMJOB_SRVUSER_10);   ycmJob cppJob(YCMJOB_SRVNAME_10, YCMJOB_SRVUSER_10);
Line 106 
Line 108 
                                             YCMJOB_CCSID_37,                                             YCMJOB_CCSID_37,
                                             YCMJOB_THREAD_YES))                                             YCMJOB_THREAD_YES))
   {  // QYCMCIMOM Server Failed on Submit Job   {  // QYCMCIMOM Server Failed on Submit Job
   #pragma convert(0)
   
       //l10n       //l10n
       //Logger::put(Logger::ERROR_LOG, System::CIMSERVER, Logger::SEVERE,       //Logger::put(Logger::ERROR_LOG, System::CIMSERVER, Logger::SEVERE,
                  //"cimserver_os400::cimserver_fork() - SBMJOB failed to start the QYCMCIMOM server program!!");                  //"cimserver_os400::cimserver_fork() - SBMJOB failed to start the QYCMCIMOM server program!!");
Line 119 
Line 123 
      std::string srvName = cppServ;      std::string srvName = cppServ;
      std::string replacementData = errCode + srvName;      std::string replacementData = errCode + srvName;
  
   #pragma convert(37)
      ycmMessage message(msgCPDDF80,      ycmMessage message(msgCPDDF80,
                         CPDprefix,                         CPDprefix,
                         replacementData,                         replacementData,
                         "cimserver_os400::cimserver_fork()",                         "cimserver_os400::cimserver_fork()",
                         ycmCTLCIMID);                          ycmCTLCIMID,
                           utf8);
      message.joblogIt(UserError,ycmMessage::Diagnostic);      message.joblogIt(UserError,ycmMessage::Diagnostic);
   #pragma convert(0)
  
      // save the job log      // save the job log
      system ("QSYS/CHGJOB JOB(*) LOG(4 00 *SECLVL)");      system ("QSYS/CHGJOB JOB(*) LOG(4 00 *SECLVL)");
Line 168 
Line 175 
    //        (it's a known problem) and we can uncomment this #pragma.    //        (it's a known problem) and we can uncomment this #pragma.
 //   #pragma cancel_handler (CancelHandler, NULL) //   #pragma cancel_handler (CancelHandler, NULL)
     try {     try {
   
    system ("QSYS/CHGJOB JOB(*) LOG(4 00 *SECLVL)");    system ("QSYS/CHGJOB JOB(*) LOG(4 00 *SECLVL)");
   
   #pragma convert(37)
    //////////////////////////////////////////    //////////////////////////////////////////
    // Change Job API call    // Change Job API call
    // Change the server type to QICM_CIMOM    // Change the server type to QICM_CIMOM
Line 191 
Line 199 
             "JOBC0200",             "JOBC0200",
             &chg,             &chg,
             &errorCode), OFF, OFF);             &errorCode), OFF, OFF);
   #pragma convert(0)
  
    ////////////////////////////////////////////////////    ////////////////////////////////////////////////////
    // Change authority to the qypsjobd job description    // Change authority to the qypsjobd job description
Line 244 
Line 253 
 /////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////
 int cimserver_kill(void) int cimserver_kill(void)
 {  // Need to kill the server {  // Need to kill the server
   #pragma convert(37)
   char rc2[3] = "02"; // CIMOM server failed to end   char rc2[3] = "02"; // CIMOM server failed to end
   char cppServ[10] = "QYCMCIMOM";   char cppServ[10] = "QYCMCIMOM";
   std::string number = YCMJOB_ALL_NUMBERS; // parameter passed to job::find method   std::string number = YCMJOB_ALL_NUMBERS; // parameter passed to job::find method
Line 265 
Line 275 
                          CPDprefix,                          CPDprefix,
                          replacementData,                          replacementData,
                          "cimserver_os400::cimserver_kill()",                          "cimserver_os400::cimserver_kill()",
                          ycmCTLCIMID);                           ycmCTLCIMID,
                            utf8);
       message.joblogIt(UserError,ycmMessage::Diagnostic);       message.joblogIt(UserError,ycmMessage::Diagnostic);
  
   #pragma convert(0)
   
       //l10n       //l10n
       //Logger::put(Logger::ERROR_LOG, System::CIMSERVER, Logger::SEVERE,       //Logger::put(Logger::ERROR_LOG, System::CIMSERVER, Logger::SEVERE,
                   //"cimserver_os400::cimserver_kill - FAILED to end the QYCMCIMOM job!!");                   //"cimserver_os400::cimserver_kill - FAILED to end the QYCMCIMOM job!!");
Line 277 
Line 290 
                         "cimserver_os400::cimserver_kill -",                         "cimserver_os400::cimserver_kill -",
                         "QYCMCIMOM");                         "QYCMCIMOM");
  
   
       return -1; // Note: this return code is ignored by the CIMOM server.       return -1; // Note: this return code is ignored by the CIMOM server.
     }     }
   }   }
Line 311 
Line 325 
 int init_fifo(const char * fifo_name){ int init_fifo(const char * fifo_name){
     int fifo = -1;     int fifo = -1;
     struct stat FIFO_STAT;     struct stat FIFO_STAT;
     int stat_rc = stat( fifo_name, &FIFO_STAT );  
       // Need to convert the fifo name to ebcdic because
       // that is what stat and open want.
       char tmp[256];
       strcpy(tmp, fifo_name);
       AtoE(tmp);
   
       int stat_rc = stat( tmp, &FIFO_STAT );
  
     // check if the FIFO already exists     // check if the FIFO already exists
     if( S_ISFIFO( FIFO_STAT.st_mode ) ){     if( S_ISFIFO( FIFO_STAT.st_mode ) ){
         // prep FIFO, on this end we only want to write to it,         // prep FIFO, on this end we only want to write to it,
         // set its I/O mode to not block on any reads         // set its I/O mode to not block on any reads
         fifo = open(fifo_name, O_RDWR | O_NONBLOCK);          fifo = open(tmp, O_RDWR | O_NONBLOCK);
     }     }
     return fifo;     return fifo;
 } }
Line 333 
Line 354 
         char rc_tmp[3];         char rc_tmp[3];
         memset(rc_tmp, 0, 3);         memset(rc_tmp, 0, 3);
         sprintf(rc_tmp,"%d",rc);         sprintf(rc_tmp,"%d",rc);
           AtoE(rc_tmp);  // qycmctlcim wants ebcdic
         write(fifo,rc_tmp,strlen(rc_tmp));         write(fifo,rc_tmp,strlen(rc_tmp));
     }     }
 } }


Legend:
Removed from v.1.14  
changed lines
  Added in v.1.15

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2