(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.131 and 1.132

version 1.131, 2008/02/29 18:12:38 version 1.132, 2008/03/19 19:21:34
Line 76 
Line 76 
     _uninitialize();     _uninitialize();
 } }
  
   void Tickler::notify()
   {
       Socket::write(_clientSocket, "\0", 1);
   }
   
   void Tickler::reset()
   {
       // Clear all bytes from the tickle socket
       char buffer[32];
       while (Socket::read(_serverSocket, buffer, 32) > 0)
       {
       }
   }
   
 #if defined(PEGASUS_OS_TYPE_UNIX) #if defined(PEGASUS_OS_TYPE_UNIX)
  
 // Use an anonymous pipe for the tickle connection. // Use an anonymous pipe for the tickle connection.
Line 95 
Line 109 
  
     _serverSocket = fds[0];     _serverSocket = fds[0];
     _clientSocket = fds[1];     _clientSocket = fds[1];
   
       Socket::disableBlocking(_serverSocket);
 } }
  
 #else #else
Line 327 
Line 343 
     // Create a MonitorEntry for the Tickler and set its state to IDLE so the     // Create a MonitorEntry for the Tickler and set its state to IDLE so the
     // Monitor will watch for its events.     // Monitor will watch for its events.
     _entries.append(MonitorEntry(     _entries.append(MonitorEntry(
         _tickler.getServerSocket(),          _tickler.getReadHandle(),
         1,         1,
         MonitorEntry::STATUS_IDLE,         MonitorEntry::STATUS_IDLE,
         MonitorEntry::TYPE_INTERNAL));          MonitorEntry::TYPE_TICKLER));
  
     // Start the count at 1 because _entries[0] is the Tickler     // Start the count at 1 because _entries[0] is the Tickler
     for (int i = 1; i < numberOfMonitorEntriesToAllocate; i++)     for (int i = 1; i < numberOfMonitorEntriesToAllocate; i++)
Line 347 
Line 363 
  
 void Monitor::tickle() void Monitor::tickle()
 { {
     Socket::write(_tickler.getClientSocket(), "\0", 1);      _tickler.notify();
 } }
  
 void Monitor::setState( void Monitor::setState(
Line 582 
Line 598 
  
  
                     }                     }
                     else if (entries[indx].type == MonitorEntry::TYPE_INTERNAL)                      else if (entries[indx].type == MonitorEntry::TYPE_TICKLER)
                     {                     {
                         char buffer;                          _tickler.reset();
                         Sint32 ignored =  
                             Socket::read(entries[indx].socket, &buffer, 1);  
                     }                     }
                     else                     else
                     {                     {


Legend:
Removed from v.1.131  
changed lines
  Added in v.1.132

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2