(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.120 and 1.121.2.2

version 1.120, 2007/06/05 09:36:36 version 1.121.2.2, 2008/09/25 18:26:38
Line 328 
Line 328 
     Socket::write(_tickle_client_socket,&_buffer, 2);     Socket::write(_tickle_client_socket,&_buffer, 2);
 } }
  
 void Monitor::setState( Uint32 index, _MonitorEntry::entry_status status )  void Monitor::setState(
       Uint32 index,
       _MonitorEntry::entry_status status)
 { {
       AutoMutex autoEntryMutex(_entry_mut);
     // Set the state to requested state     // Set the state to requested state
     _entries[index]._status = status;     _entries[index]._status = status;
 } }
Line 622 
Line 625 
                         Message* msg = new SocketMessage(                         Message* msg = new SocketMessage(
                             entries[indx].socket, events);                             entries[indx].socket, events);
                         entries[indx]._status = _MonitorEntry::BUSY;                         entries[indx]._status = _MonitorEntry::BUSY;
                           SocketHandle sock = entries[indx].socket;
                         _entry_mut.unlock();                         _entry_mut.unlock();
                         q->enqueue(msg);                         q->enqueue(msg);
                         _entry_mut.lock();                         _entry_mut.lock();
  
                           // If _entries[indx] no longer refers to the same
                           // socket, then another thread has changed _entries[].
                           // We must return now and skip the code below that
                           // updates _entries[indx].
                           if (Uint32(indx) >= _entries.size() ||
                               _entries[indx].socket != sock)
                           {
                               return;
                           }
   
                         // After enqueue a message and the autoEntryMutex has                         // After enqueue a message and the autoEntryMutex has
                         // been released and locked again, the array of                         // been released and locked again, the array of
                         // entries can be changed. The ArrayIterator has be                         // entries can be changed. The ArrayIterator has be
Line 683 
Line 697 
         }         }
     }     }
  
     int index;      for (int index = 1; index < (int)_entries.size(); index++)
     for (index = 1; index < (int)_entries.size(); index++)  
     {     {
         try         try
         {         {


Legend:
Removed from v.1.120  
changed lines
  Added in v.1.121.2.2

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2