(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.10 and 1.11

version 1.10, 2002/05/21 17:20:26 version 1.11, 2002/05/22 05:25:30
Line 97 
Line 97 
  
 Monitor::~Monitor() Monitor::~Monitor()
 { {
    printf("deregistering with module controller\n");      Tracer::trace(TRC_HTTP, Tracer::LEVEL4,
                     "deregistering with module controller");
  
    if(_module_handle != NULL)    if(_module_handle != NULL)
     {     {
Line 105 
Line 106 
        _controller = 0;        _controller = 0;
        delete _module_handle;        delete _module_handle;
     }     }
    printf("deleting rep\n");      Tracer::trace(TRC_HTTP, Tracer::LEVEL4, "deleting rep");
  
     delete _rep;     delete _rep;
     printf("uninitializing interface \n");      Tracer::trace(TRC_HTTP, Tracer::LEVEL4, "uninitializing interface");
     Socket::uninitializeInterface();     Socket::uninitializeInterface();
     printf("returning from monitor destructor\n");      Tracer::trace(TRC_HTTP, Tracer::LEVEL4,
                     "returning from monitor destructor");
 } }
  
  
Line 224 
Line 226 
                  Message* message= new CloseConnectionMessage(static_cast<HTTPConnection *>(q)->getSocket());                  Message* message= new CloseConnectionMessage(static_cast<HTTPConnection *>(q)->getSocket());
                  message->dest = o.getQueueId();                  message->dest = o.getQueueId();
                  o.enqueue(message);                  o.enqueue(message);
                  i = 0;                   i--;
                  n = _entries.size();                  n = _entries.size();
                  continue;                  continue;
               }               }
Line 271 
Line 273 
  
             if(_entries[i]._type == Monitor::CONNECTION)             if(_entries[i]._type == Monitor::CONNECTION)
             {             {
                  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
                     static_cast<HTTPConnection *>(queue)->refcount--;
             }             }
             else             else
             {             {
Line 317 
Line 322 
         FD_SET(socket, &_rep->ex_fd_set);         FD_SET(socket, &_rep->ex_fd_set);
  
     // Add the entry to the list:     // Add the entry to the list:
   
     _MonitorEntry entry(socket, queueId, type);     _MonitorEntry entry(socket, queueId, type);
     entry.dying = 0;  
   
     _entries.append(entry);     _entries.append(entry);
  
     // Success!     // Success!
       // ATTN-RK-P2-20020521: Why do we need this?
     ModuleController* controlService =     ModuleController* controlService =
         new ModuleController(PEGASUS_QUEUENAME_CONTROLSERVICE);         new ModuleController(PEGASUS_QUEUENAME_CONTROLSERVICE);
     PEG_METHOD_EXIT();     PEG_METHOD_EXIT();
Line 345 
Line 348 
             FD_CLR(socket, &_rep->wr_fd_set);             FD_CLR(socket, &_rep->wr_fd_set);
             FD_CLR(socket, &_rep->ex_fd_set);             FD_CLR(socket, &_rep->ex_fd_set);
             _entries.remove(i);             _entries.remove(i);
               // ATTN-RK-P3-20020521: Need "Socket::close(socket);" here?
             PEG_METHOD_EXIT();             PEG_METHOD_EXIT();
             return true;             return true;
         }         }
Line 369 
Line 373 
 { {
    HTTPConnection *dst = reinterpret_cast<HTTPConnection *>(parm);    HTTPConnection *dst = reinterpret_cast<HTTPConnection *>(parm);
    if( true == dst->is_dying())    if( true == dst->is_dying())
      {
         dst->refcount--;
       return 0;       return 0;
      }
    dst->lock_connection();    dst->lock_connection();
    if( false == dst->is_dying())    if( false == dst->is_dying())
       dst->run(1);       dst->run(1);
      dst->refcount--;
    dst->unlock_connection();    dst->unlock_connection();
  
    return 0;    return 0;


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

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2