(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.8 and 1.25.2.9

version 1.25.2.8, 2006/10/10 18:10:15 version 1.25.2.9, 2007/03/09 18:47:03
Line 190 
Line 190 
         The connection is closed and outstanding requests are completed         The connection is closed and outstanding requests are completed
         with an error result.         with an error result.
  
         Note: The caller must lock the _agentMutex.  
   
         @param cleanShutdown Indicates whether the provider agent process         @param cleanShutdown Indicates whether the provider agent process
         exited cleanly.  A value of true indicates that responses have been         exited cleanly.  A value of true indicates that responses have been
         sent for all requests that have been processed.  A value of false         sent for all requests that have been processed.  A value of false
Line 887 
Line 885 
     return _isInitialized;     return _isInitialized;
 } }
  
 // Note: Caller must lock _agentMutex  
 void ProviderAgentContainer::_uninitialize(Boolean cleanShutdown) void ProviderAgentContainer::_uninitialize(Boolean cleanShutdown)
 { {
     PEG_METHOD_ENTER(TRC_PROVIDERMANAGER,     PEG_METHOD_ENTER(TRC_PROVIDERMANAGER,
         "ProviderAgentContainer::_uninitialize");         "ProviderAgentContainer::_uninitialize");
  
     if (!_isInitialized)  #if defined(PEGASUS_HAS_SIGNALS)
     {      pid_t pid;
         PEGASUS_ASSERT(0);  #endif
         PEG_METHOD_EXIT();  
         return;  
     }  
  
     try     try
     {     {
           AutoMutex lock(_agentMutex);
   
           PEGASUS_ASSERT(_isInitialized);
   
         // Close the connection with the Provider Agent         // Close the connection with the Provider Agent
         _pipeFromAgent.reset();         _pipeFromAgent.reset();
         _pipeToAgent.reset();         _pipeToAgent.reset();
Line 914 
Line 912 
         }         }
  
 #if defined(PEGASUS_HAS_SIGNALS) #if defined(PEGASUS_HAS_SIGNALS)
         // Harvest the status of the agent process to prevent a zombie          // Save the _pid so we can use it after we've released the _agentMutex
         pid_t status = 0;          pid = _pid;
         do  
         {  
             status = waitpid(_pid, 0, 0);  
         } while ((status == -1) && (errno == EINTR));  
   
         if (status == -1)  
         {  
             Tracer::trace(TRC_DISCARDED_DATA, Tracer::LEVEL2,  
                 "ProviderAgentContainer::_uninitialize(): "  
                     "waitpid failed; errno = %d.", errno);  
         }  
 #endif #endif
  
         _isInitialized = false;         _isInitialized = false;
Line 977 
Line 964 
             "Ignoring _uninitialize() exception.");             "Ignoring _uninitialize() exception.");
     }     }
  
   #if defined(PEGASUS_HAS_SIGNALS)
       // Harvest the status of the agent process to prevent a zombie.  Do not
       // hold the _agentMutex during this operation.
       pid_t status = 0;
       do
       {
           status = waitpid(pid, 0, 0);
       } while ((status == -1) && (errno == EINTR));
   
       if (status == -1)
       {
           Tracer::trace(TRC_DISCARDED_DATA, Tracer::LEVEL2,
               "ProviderAgentContainer::_uninitialize(): "
                   "waitpid failed; errno = %d.", errno);
       }
   #endif
   
     PEG_METHOD_EXIT();     PEG_METHOD_EXIT();
 } }
  
Line 1325 
Line 1329 
             if ((readStatus == AnonymousPipe::STATUS_ERROR) ||             if ((readStatus == AnonymousPipe::STATUS_ERROR) ||
                 (readStatus == AnonymousPipe::STATUS_CLOSED))                 (readStatus == AnonymousPipe::STATUS_CLOSED))
             {             {
                 AutoMutex lock(_agentMutex);  
                 _uninitialize(false);                 _uninitialize(false);
                 return;                 return;
             }             }
Line 1334 
Line 1337 
             // finished its processing and is ready to exit.             // finished its processing and is ready to exit.
             if (message == 0)             if (message == 0)
             {             {
                 AutoMutex lock(_agentMutex);  
                 _uninitialize(true);                 _uninitialize(true);
                 return;                 return;
             }             }
Line 1897 
Line 1899 
     PEG_METHOD_ENTER(TRC_PROVIDERMANAGER,     PEG_METHOD_ENTER(TRC_PROVIDERMANAGER,
         "OOPProviderManagerRouter::unloadIdleProviders");         "OOPProviderManagerRouter::unloadIdleProviders");
  
       // Get a list of the ProviderAgentContainers.  We need our own array copy
       // because we cannot hold the _providerAgentTableMutex while calling
       // ProviderAgentContainer::unloadIdleProviders().
       Array<ProviderAgentContainer*> paContainerArray;
       {
           AutoMutex tableLock(_providerAgentTableMutex);
           for (ProviderAgentTable::Iterator i = _providerAgentTable.start();
                i != 0; i++)
           {
               paContainerArray.append(i.value());
           }
       }
   
     // Iterate through the _providerAgentTable unloading idle providers     // Iterate through the _providerAgentTable unloading idle providers
     AutoMutex lock(_providerAgentTableMutex);      for (Uint32 j = 0; j < paContainerArray.size(); j++)
     ProviderAgentTable::Iterator i = _providerAgentTable.start();  
     for(; i != 0; i++)  
     {     {
         i.value()->unloadIdleProviders();          paContainerArray[j]->unloadIdleProviders();
     }     }
  
     PEG_METHOD_EXIT();     PEG_METHOD_EXIT();


Legend:
Removed from v.1.25.2.8  
changed lines
  Added in v.1.25.2.9

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2