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

Diff for /pegasus/src/Pegasus/Common/Monitor.cpp between version 1.11 and 1.12

version 1.11, 2002/05/22 05:25:30 version 1.12, 2002/05/23 20:11:56
Line 126 
Line 126 
  
 Boolean Monitor::run(Uint32 milliseconds) Boolean Monitor::run(Uint32 milliseconds)
 { {
   
   
    // register the monitor as a module to gain access to the cimserver's thread pool    // register the monitor as a module to gain access to the cimserver's thread pool
    // <<< Wed May 15 09:52:16 2002 mdd >>>    // <<< Wed May 15 09:52:16 2002 mdd >>>
    while(_module_handle == NULL)    while(_module_handle == NULL)
    {    {
   
       try       try
       {       {
   
          _controller = &(ModuleController::register_module(PEGASUS_QUEUENAME_CONTROLSERVICE,          _controller = &(ModuleController::register_module(PEGASUS_QUEUENAME_CONTROLSERVICE,
                                                            PEGASUS_MODULENAME_MONITOR,                                                            PEGASUS_MODULENAME_MONITOR,
                                                            (void *)this,                                                            (void *)this,
Line 143 
Line 139 
                                                            0,                                                            0,
                                                            0,                                                            0,
                                                            &_module_handle));                                                            &_module_handle));
          break;  
  
       }       }
       catch( ... )        catch(IncompatibleTypes &)
       {       {
          ;           ModuleController* controlService =
               new ModuleController(PEGASUS_QUEUENAME_CONTROLSERVICE);
         }
         catch( AlreadyExists & )
         {
            break;
       }       }
    }    }
   
  
 #ifdef PEGASUS_OS_TYPE_WINDOWS #ifdef PEGASUS_OS_TYPE_WINDOWS
  
Line 217 
Line 216 
            {            {
  
               MessageQueue *q = MessageQueue::lookup(_entries[i].queueId);               MessageQueue *q = MessageQueue::lookup(_entries[i].queueId);
               if(q && static_cast<HTTPConnection *>(q)->is_dying())                if(q && static_cast<HTTPConnection *>(q)->is_dying() &&
                    (0 == static_cast<HTTPConnection *>(q)->refcount.value()))
               {               {
                  static_cast<HTTPConnection *>(q)->lock_connection();                  static_cast<HTTPConnection *>(q)->lock_connection();
                  static_cast<HTTPConnection *>(q)->unlock_connection();                  static_cast<HTTPConnection *>(q)->unlock_connection();
Line 273 
Line 273 
  
             if(_entries[i]._type == Monitor::CONNECTION)             if(_entries[i]._type == Monitor::CONNECTION)
             {             {
                  if( 0 == static_cast<HTTPConnection *>(queue)->refcount.value())
                  {
                static_cast<HTTPConnection *>(queue)->refcount++;                static_cast<HTTPConnection *>(queue)->refcount++;
                if( false == static_cast<HTTPConnection *>(queue)->is_dying())                if( false == static_cast<HTTPConnection *>(queue)->is_dying())
                   _controller->async_thread_exec(*_module_handle, _dispatch, (void *)queue);                   _controller->async_thread_exec(*_module_handle, _dispatch, (void *)queue);
                else                else
                   static_cast<HTTPConnection *>(queue)->refcount--;                   static_cast<HTTPConnection *>(queue)->refcount--;
             }             }
               }
             else             else
             {             {
                Message* message = new SocketMessage(socket, events);                Message* message = new SocketMessage(socket, events);
Line 326 
Line 329 
     _entries.append(entry);     _entries.append(entry);
  
     // Success!     // Success!
     // ATTN-RK-P2-20020521: Why do we need this?  
     ModuleController* controlService =  
         new ModuleController(PEGASUS_QUEUENAME_CONTROLSERVICE);  
     PEG_METHOD_EXIT();     PEG_METHOD_EXIT();
     return true;     return true;
 } }
Line 377 
Line 378 
       dst->refcount--;       dst->refcount--;
       return 0;       return 0;
    }    }
    dst->lock_connection();  
    if( false == dst->is_dying())    if( false == dst->is_dying())
      {
       dst->run(1);       dst->run(1);
      }
    dst->refcount--;    dst->refcount--;
    dst->unlock_connection();  
   
    return 0;    return 0;
 } }
  


Legend:
Removed from v.1.11  
changed lines
  Added in v.1.12

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2