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

Diff for /pegasus/src/Pegasus/ProviderManager2/Attic/OOPProviderManagerRouter.cpp between version 1.25.2.7 and 1.31.2.1

version 1.25.2.7, 2006/10/06 17:40:04 version 1.31.2.1, 2006/07/27 23:12:06
Line 38 
Line 38 
 // //
 //%///////////////////////////////////////////////////////////////////////////// //%/////////////////////////////////////////////////////////////////////////////
  
   #include <Pegasus/Common/Signal.h>
 #include <Pegasus/Common/Config.h> #include <Pegasus/Common/Config.h>
 #include <Pegasus/Common/Constants.h> #include <Pegasus/Common/Constants.h>
 #include <Pegasus/Common/AutoPtr.h> #include <Pegasus/Common/AutoPtr.h>
Line 209 
Line 210 
         the connection is closed.         the connection is closed.
      */      */
     void _processResponses();     void _processResponses();
     static PEGASUS_THREAD_RETURN PEGASUS_THREAD_CDECL      static ThreadReturnType PEGASUS_THREAD_CDECL
         _responseProcessor(void* arg);         _responseProcessor(void* arg);
  
     //     //
Line 381 
Line 382 
             // Wait for the responseProcessor thread to exit             // Wait for the responseProcessor thread to exit
             while (isInitialized())             while (isInitialized())
             {             {
                 pegasus_yield();                  Threads::yield();
             }             }
         }         }
     }     }
Line 801 
Line 802 
         {         {
             if (rtn == PEGASUS_THREAD_INSUFFICIENT_RESOURCES)             if (rtn == PEGASUS_THREAD_INSUFFICIENT_RESOURCES)
             {             {
                 pegasus_yield();                  Threads::yield();
             }             }
             else             else
             {             {
Line 832 
Line 833 
         if (_isInitialized)         if (_isInitialized)
         {         {
             // Harvest the status of the agent process to prevent a zombie             // Harvest the status of the agent process to prevent a zombie
             pid_t status = 0;              Boolean keepWaiting = false;
             do             do
             {             {
                 status = waitpid(_pid, 0, 0);                  pid_t status = waitpid(_pid, 0, 0);
             } while ((status == -1) && (errno == EINTR));  
   
             if (status == -1)             if (status == -1)
             {             {
                       if (errno == EINTR)
                       {
                           keepWaiting = true;
                       }
                       else
                       {
                 Tracer::trace(TRC_DISCARDED_DATA, Tracer::LEVEL2,                 Tracer::trace(TRC_DISCARDED_DATA, Tracer::LEVEL2,
                     "ProviderAgentContainer::_initialize(): "                     "ProviderAgentContainer::_initialize(): "
                         "waitpid failed; errno = %d.", errno);                         "waitpid failed; errno = %d.", errno);
             }             }
         }         }
               } while (keepWaiting);
           }
 #endif #endif
  
         _isInitialized = false;         _isInitialized = false;
Line 895 
Line 902 
  
 #if defined(PEGASUS_HAS_SIGNALS) #if defined(PEGASUS_HAS_SIGNALS)
         // Harvest the status of the agent process to prevent a zombie         // Harvest the status of the agent process to prevent a zombie
         pid_t status = 0;          Boolean keepWaiting = false;
         do         do
         {         {
             status = waitpid(_pid, 0, 0);              pid_t status = waitpid(_pid, 0, 0);
         } while ((status == -1) && (errno == EINTR));  
   
         if (status == -1)         if (status == -1)
         {         {
                   if (errno == EINTR)
                   {
                       keepWaiting = true;
                   }
                   else
                   {
             Tracer::trace(TRC_DISCARDED_DATA, Tracer::LEVEL2,             Tracer::trace(TRC_DISCARDED_DATA, Tracer::LEVEL2,
                 "ProviderAgentContainer::_uninitialize(): "                 "ProviderAgentContainer::_uninitialize(): "
                     "waitpid failed; errno = %d.", errno);                     "waitpid failed; errno = %d.", errno);
         }         }
               }
           } while (keepWaiting);
 #endif #endif
  
         _isInitialized = false;         _isInitialized = false;
Line 1006 
Line 1019 
         }         }
     } while (response == _REQUEST_NOT_PROCESSED);     } while (response == _REQUEST_NOT_PROCESSED);
  
     if (request->getType() == CIM_SUBSCRIPTION_INIT_COMPLETE_REQUEST_MESSAGE)  
     {  
         _subscriptionInitComplete = true;  
     }  
   
     PEG_METHOD_EXIT();     PEG_METHOD_EXIT();
     return response;     return response;
 } }
Line 1078 
Line 1086 
             // Get the provider module from the ProviderIdContainer to see if             // Get the provider module from the ProviderIdContainer to see if
             // we can optimize out the transmission of this instance to the             // we can optimize out the transmission of this instance to the
             // Provider Agent.  (See the _providerModuleCache description.)             // Provider Agent.  (See the _providerModuleCache description.)
             try              if(request->operationContext.contains(ProviderIdContainer::NAME))
             {             {
                 ProviderIdContainer pidc = request->operationContext.get(                 ProviderIdContainer pidc = request->operationContext.get(
                     ProviderIdContainer::NAME);                     ProviderIdContainer::NAME);
Line 1103 
Line 1111 
                     doProviderModuleOptimization = true;                     doProviderModuleOptimization = true;
                 }                 }
             }             }
             catch (...)  
             {  
                 // No ProviderIdContainer to optimize  
             }  
  
             //             //
             // Write the message to the pipe             // Write the message to the pipe
Line 1387 
Line 1391 
  
 } }
  
 PEGASUS_THREAD_RETURN PEGASUS_THREAD_CDECL  ThreadReturnType PEGASUS_THREAD_CDECL
 ProviderAgentContainer::_responseProcessor(void* arg) ProviderAgentContainer::_responseProcessor(void* arg)
 { {
     ProviderAgentContainer* pa =     ProviderAgentContainer* pa =
Line 1395 
Line 1399 
  
     pa->_processResponses();     pa->_processResponses();
  
     return(PEGASUS_THREAD_RETURN(0));      return(ThreadReturnType(0));
 } }
  
 ///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
Line 1723 
Line 1727 
  
     if (userContext == PG_PROVMODULE_USERCTXT_REQUESTOR)     if (userContext == PG_PROVMODULE_USERCTXT_REQUESTOR)
     {     {
         try          if(request->operationContext.contains(IdentityContainer::NAME))
         {         {
             // User Name is in the OperationContext             // User Name is in the OperationContext
             IdentityContainer ic = (IdentityContainer)             IdentityContainer ic = (IdentityContainer)
                 request->operationContext.get(IdentityContainer::NAME);                 request->operationContext.get(IdentityContainer::NAME);
             userName = ic.getUserName();             userName = ic.getUserName();
         }         }
         catch (Exception&)          //else
         {          //{
             // If no IdentityContainer is present, default to the CIM             // If no IdentityContainer is present, default to the CIM
             // Server's user context             // Server's user context
         }          //}
  
         // If authentication is disabled, use the CIM Server's user context         // If authentication is disabled, use the CIM Server's user context
         if (!userName.size())         if (!userName.size())


Legend:
Removed from v.1.25.2.7  
changed lines
  Added in v.1.31.2.1

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2