(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.52 and 1.53

version 1.52, 2003/10/01 00:14:57 version 1.53, 2003/10/05 15:36:03
Line 250 
Line 250 
            events, _idleEntries);            events, _idleEntries);
        for( int indx = 0; indx < (int)_entries.size(); indx++)        for( int indx = 0; indx < (int)_entries.size(); indx++)
        {        {
           if(FD_ISSET(_entries[indx].socket, &fdread))            // The Monitor should only look at entries in the table that are IDLE (i.e.,
             // owned by the Monitor).
             if((_entries[indx]._status.value() == _MonitorEntry::IDLE) &&
                (FD_ISSET(_entries[indx].socket, &fdread)))
           {           {
              MessageQueue *q = MessageQueue::lookup(_entries[indx].queueId);              MessageQueue *q = MessageQueue::lookup(_entries[indx].queueId);
              if(q == 0)               Tracer::trace(TRC_HTTP, Tracer::LEVEL4,
              {                    "Monitor::run indx = %d, queueId =  %d, q = %p",
                 try                    indx, _entries[indx].queueId, q);
                 {               PEGASUS_ASSERT(q !=0);
                    _entries[indx]._status = _MonitorEntry::EMPTY;  
                 }  
                 catch(...)  
                 {  
  
                 }  
                 continue;  
              }  
              try              try
              {              {
                 if(_entries[indx]._type == Monitor::CONNECTION)                 if(_entries[indx]._type == Monitor::CONNECTION)
Line 371 
Line 367 
        if(_entries[index].socket == socket)        if(_entries[index].socket == socket)
        {        {
           _entries[index]._status = _MonitorEntry::EMPTY;           _entries[index]._status = _MonitorEntry::EMPTY;
             _entries[index].socket = -1;
           break;           break;
        }        }
     }     }
Line 382 
Line 379 
 { {
    HTTPConnection *dst = reinterpret_cast<HTTPConnection *>(parm);    HTTPConnection *dst = reinterpret_cast<HTTPConnection *>(parm);
    Tracer::trace(TRC_HTTP, Tracer::LEVEL4,    Tracer::trace(TRC_HTTP, Tracer::LEVEL4,
           "Monitor::_dispatch: entering run() for index  = %d",          "Monitor::_dispatch: entering run() for indx  = %d, queueId = %d, q = %p",
           dst->_entry_index);          dst->_entry_index, dst->_monitor->_entries[dst->_entry_index].queueId, dst);
    try    try
    {    {
       dst->run(1);       dst->run(1);
Line 401 
Line 398 
    // if the connection is being closed.  However, the current logic    // if the connection is being closed.  However, the current logic
    // in Monitor::run requires this value to be set for the close    // in Monitor::run requires this value to be set for the close
    // to be processed.    // to be processed.
   
      PEGASUS_ASSERT(dst->_monitor->_entries[dst->_entry_index]._status.value() == _MonitorEntry::BUSY);
    dst->_monitor->_entries[dst->_entry_index]._status = _MonitorEntry::IDLE;    dst->_monitor->_entries[dst->_entry_index]._status = _MonitorEntry::IDLE;
    if (dst->_connectionClosePending)    if (dst->_connectionClosePending)
    {    {


Legend:
Removed from v.1.52  
changed lines
  Added in v.1.53

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2