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

Diff for /pegasus/src/Pegasus/Common/Socket.cpp between version 1.32.4.1 and 1.32.4.2

version 1.32.4.1, 2008/09/12 07:56:43 version 1.32.4.2, 2008/10/01 17:03:46
Line 39 
Line 39 
 #include <Pegasus/Common/Logger.h> #include <Pegasus/Common/Logger.h>
 #include <Pegasus/Common/System.h> #include <Pegasus/Common/System.h>
 #include <Pegasus/Common/Tracer.h> #include <Pegasus/Common/Tracer.h>
   #include <Pegasus/Common/Threads.h>
  
 PEGASUS_NAMESPACE_BEGIN PEGASUS_NAMESPACE_BEGIN
  
Line 51 
Line 52 
     Uint32 timeoutMilliseconds)     Uint32 timeoutMilliseconds)
 { {
     int connectResult;     int connectResult;
     PEGASUS_RETRY_SYSTEM_CALL(  #ifdef PEGASUS_OS_TYPE_WINDOWS
         ::connect(socket, address, addressLength), connectResult);      connectResult = ::connect(socket, address, addressLength);
   #else
       Boolean connectionAlreadyRefused = false;
       Uint32 maxConnectAttempts = 100;
       // Retry the connect() until it succeeds or it fails with an error other
       // than EINTR, EAGAIN (for Linux), or the first ECONNREFUSED (for HP-UX).
       while (((connectResult = ::connect(socket, address, addressLength)) == -1)
              && (maxConnectAttempts-- > 0)
              && ((errno == EINTR) || (errno == EAGAIN) ||
                  ((errno == ECONNREFUSED) && !connectionAlreadyRefused)))
       {
           if (errno == ECONNREFUSED)
           {
               connectionAlreadyRefused = true;
           }
           Threads::sleep(1);
       }
   #endif
  
     if (connectResult == 0)     if (connectResult == 0)
     {     {


Legend:
Removed from v.1.32.4.1  
changed lines
  Added in v.1.32.4.2

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2