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

Diff for /pegasus/src/Pegasus/Listener/CIMListener.cpp between version 1.40 and 1.40.12.1

version 1.40, 2006/01/30 16:17:58 version 1.40.12.1, 2006/07/05 19:45:12
Line 119 
Line 119 
         Uint32 _portNumber;         Uint32 _portNumber;
         SSLContext* _sslContext;         SSLContext* _sslContext;
         Monitor* _monitor;         Monitor* _monitor;
           Mutex _monitorMutex;
         HTTPAcceptor* _acceptor;         HTTPAcceptor* _acceptor;
  
   Boolean                                       _dieNow;   Boolean                                       _dieNow;
Line 243 
Line 244 
 { {
     PEG_METHOD_ENTER(TRC_LISTENER, "CIMListenerService::shutdown()");     PEG_METHOD_ENTER(TRC_LISTENER, "CIMListenerService::shutdown()");
  
       // This logic signals the thread currently executing _listener_routine()
       // to exit. That function deletes this instance of CIMListenerService,
       // which deletes the _monitor member. We use a mutex to keep it from
       // deleting the monitor until after tickle has been called.
       {
           AutoMutex am(_monitorMutex);
     _dieNow = true;     _dieNow = true;
     _monitor->tickle();     _monitor->tickle();
       }
  
     PEG_METHOD_EXIT();     PEG_METHOD_EXIT();
 } }
Line 314 
Line 322 
  
 PEGASUS_THREAD_RETURN PEGASUS_THREAD_CDECL CIMListenerService::_listener_routine(void *param) PEGASUS_THREAD_RETURN PEGASUS_THREAD_CDECL CIMListenerService::_listener_routine(void *param)
 { {
       CIMListenerService* svc = reinterpret_cast<CIMListenerService*>(param);
   
   try {   try {
     AutoPtr<CIMListenerService> svc(reinterpret_cast<CIMListenerService *>(param));  
  
     //svc->init(); bug 1394     //svc->init(); bug 1394
     while(!svc->terminated())     while(!svc->terminated())
Line 330 
Line 339 
         Tracer::trace(TRC_SERVER, Tracer::LEVEL2,         Tracer::trace(TRC_SERVER, Tracer::LEVEL2,
                         "Unknown exception thrown in _listener_routine.");                         "Unknown exception thrown in _listener_routine.");
   }   }
   
     // CAUTION: deleting the service also deletes the monitor whose tickle()
     // method may still be executing in another thread. This line of code was
     // most likely reached when the CIMListenerService::shutdown() method set
     // _dieNow to true and called Monitor::tickle(). We must wait until we can
     // obtain the _monitorMutex, indicating that we are no longer inside
     // Monitor::ticle().
   
     svc->_monitorMutex.lock();
     svc->_monitorMutex.unlock();
     delete svc;
   
     return 0;     return 0;
 } }
  


Legend:
Removed from v.1.40  
changed lines
  Added in v.1.40.12.1

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2