(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.25 and 1.30

version 1.25, 2004/10/17 20:39:56 version 1.30, 2005/04/01 17:26:54
Line 1 
Line 1 
 //%2004////////////////////////////////////////////////////////////////////////  //%2005////////////////////////////////////////////////////////////////////////
 // //
 // Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development // Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development
 // Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems. // Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems.
Line 6 
Line 6 
 // IBM Corp.; EMC Corporation, The Open Group. // IBM Corp.; EMC Corporation, The Open Group.
 // Copyright (c) 2004 BMC Software; Hewlett-Packard Development Company, L.P.; // Copyright (c) 2004 BMC Software; Hewlett-Packard Development Company, L.P.;
 // IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group. // IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group.
   // Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.;
   // EMC Corporation; VERITAS Software Corporation; The Open Group.
 // //
 // Permission is hereby granted, free of charge, to any person obtaining a copy // Permission is hereby granted, free of charge, to any person obtaining a copy
 // of this software and associated documentation files (the "Software"), to // of this software and associated documentation files (the "Software"), to
Line 29 
Line 31 
 // //
 // Modified By:   Dan Gorey (djgorey@us.ibm.com) // Modified By:   Dan Gorey (djgorey@us.ibm.com)
 //                Amit K Arora, IBM (amita@in.ibm.com) for PEP#183 //                Amit K Arora, IBM (amita@in.ibm.com) for PEP#183
   //                Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com)
 // //
 //%///////////////////////////////////////////////////////////////////////////// //%/////////////////////////////////////////////////////////////////////////////
  
Line 104 
Line 107 
 private: private:
         Uint32                  _portNumber;         Uint32                  _portNumber;
         SSLContext* _sslContext;         SSLContext* _sslContext;
   #ifdef PEGASUS_USE_23HTTPMONITOR_CLIENT  
         Monitor*                                _monitor;         Monitor*                                _monitor;
   HTTPAcceptor*   _acceptor;   HTTPAcceptor*   _acceptor;
   #else  
         monitor_2*                              _monitor;  
   pegasus_acceptor*   _acceptor;  
   #endif  
  
   Boolean                                       _dieNow;   Boolean                                       _dieNow;
  
Line 170 
Line 168 
 { {
         PEG_METHOD_ENTER(TRC_LISTENER, "CIMListenerService::init");         PEG_METHOD_ENTER(TRC_LISTENER, "CIMListenerService::init");
  
   #ifdef PEGASUS_USE_23HTTPMONITOR_CLIENT    _monitor = new Monitor();
   _monitor = new Monitor(true);  
   #else  
   _monitor = new monitor_2();  
   #endif  
  
         //_dispatcher = new CIMListenerIndicationDispatcher();         //_dispatcher = new CIMListenerIndicationDispatcher();
  
Line 183 
Line 177 
                 _dispatcher,                 _dispatcher,
                 _responseEncoder->getQueueId());                 _responseEncoder->getQueueId());
  
   #ifdef PEGASUS_USE_23HTTPMONITOR_CLIENT  
   _acceptor = new HTTPAcceptor(   _acceptor = new HTTPAcceptor(
                  _monitor,                  _monitor,
                  _requestDecoder,                  _requestDecoder,
Line 191 
Line 184 
                  _portNumber,                  _portNumber,
                  _sslContext,                  _sslContext,
                  false);                  false);
   #else  
   _acceptor = new pegasus_acceptor(_monitor,  
                    _requestDecoder,  
                    false,  
                    _portNumber,  
                    _sslContext);  
   #endif  
  
   bind();   bind();
  
Line 224 
Line 210 
  
   if(!_dieNow)   if(!_dieNow)
     {     {
 #ifdef PEGASUS_USE_23HTTPMONITOR_CLIENT  
       if(false == _monitor->run(500000))       if(false == _monitor->run(500000))
         {         {
           modulator++;           modulator++;
Line 232 
Line 217 
       {       {
              //MessageQueueService::_check_idle_flag = 1;              //MessageQueueService::_check_idle_flag = 1;
                  //MessageQueueService::_polling_sem.signal();                  //MessageQueueService::_polling_sem.signal();
                  MessageQueueService::get_thread_pool()->kill_idle_threads();                   MessageQueueService::get_thread_pool()->cleanupIdleThreads();
       }       }
           catch(...)           catch(...)
       {       {
Line 248 
Line 233 
         handleShutdownSignal = false;         handleShutdownSignal = false;
       }       }
 */ */
 #else  
       _monitor->run();  
 #endif  
     }     }
 } }
  
Line 259 
Line 241 
     PEG_METHOD_ENTER(TRC_LISTENER, "CIMListenerService::shutdown()");     PEG_METHOD_ENTER(TRC_LISTENER, "CIMListenerService::shutdown()");
  
     _dieNow = true;     _dieNow = true;
 #ifdef PEGASUS_USE_23HTTPMONITOR_CLIENT  
     _monitor->tickle();     _monitor->tickle();
 #endif  
  
     PEG_METHOD_EXIT();     PEG_METHOD_EXIT();
 } }
Line 281 
Line 261 
     PEG_METHOD_ENTER(TRC_LISTENER, "CIMListenerService::stopClientConnection()");     PEG_METHOD_ENTER(TRC_LISTENER, "CIMListenerService::stopClientConnection()");
  
     // tell Monitor to stop listening for client connections     // tell Monitor to stop listening for client connections
     #ifdef PEGASUS_USE_23HTTPMONITOR_CLIENT  
     _monitor->stopListeningForConnections(true);     _monitor->stopListeningForConnections(true);
     #else  
     _monitor->stop();  
     #endif  
  
     //     //
     // Wait 150 milliseconds to allow time for the Monitor to stop     // Wait 150 milliseconds to allow time for the Monitor to stop
Line 336 
Line 312 
  
   return 0;   return 0;
 } }
 static struct timeval create_time = {0, 1};  
 static struct timeval destroy_time = {15, 0};  
 static struct timeval deadlock_time = {0, 0};  
  
 ///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
 // CIMListenerRep // CIMListenerRep
Line 449 
Line 422 
       throw;       throw;
     }     }
  
     _thread_pool = new ThreadPool(0, "Listener", 0, 1,      struct timeval deallocateWait = {15, 0};
                                   create_time, destroy_time, deadlock_time);      _thread_pool = new ThreadPool(0, "Listener", 0, 1, deallocateWait);
  
     _listener_sem = new Semaphore(0);     _listener_sem = new Semaphore(0);
     _thread_pool->allocate_and_awaken(svc,     _thread_pool->allocate_and_awaken(svc,


Legend:
Removed from v.1.25  
changed lines
  Added in v.1.30

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2