(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.26.4.1 and 1.29

version 1.26.4.1, 2008/01/02 21:05:03 version 1.29, 2008/02/26 19:15:05
Line 205 
Line 205 
     }     }
 } }
  
 void Socket::close(SocketHandle socket)  void Socket::close(SocketHandle& socket)
 { {
     if (socket != -1)      if (socket != PEGASUS_INVALID_SOCKET)
     {     {
 #ifdef PEGASUS_OS_TYPE_WINDOWS #ifdef PEGASUS_OS_TYPE_WINDOWS
         if (!closesocket(socket))         if (!closesocket(socket))
             socket = -1;          {
               socket = PEGASUS_INVALID_SOCKET;
           }
 #else #else
         int status;         int status;
         PEGASUS_RETRY_SYSTEM_CALL(::close(socket), status);         PEGASUS_RETRY_SYSTEM_CALL(::close(socket), status);
  
         if (status == 0)         if (status == 0)
             socket = -1;          {
               socket = PEGASUS_INVALID_SOCKET;
           }
 #endif #endif
     }     }
 } }
Line 318 
Line 322 
     {     {
         newSocket = socket(domain,type,protocol);         newSocket = socket(domain,type,protocol);
  
           if ((newSocket != PEGASUS_INVALID_SOCKET) ||
               (getSocketError() != PEGASUS_NETWORK_TRYAGAIN))
           {
               break;
           }
   
   #ifdef PEGASUS_OS_ZOS
         // The program should wait for transport layer to become ready.         // The program should wait for transport layer to become ready.
  
         if (newSocket == PEGASUS_INVALID_SOCKET &&  
            getSocketError() == PEGASUS_NETWORK_TCPIP_TRYAGAIN )  
         {  
            if (sendTcpipMsg)            if (sendTcpipMsg)
            {            {
                Logger::put_l(                Logger::put_l(
Line 333 
Line 341 
            }            }
  
            System::sleep(30);            System::sleep(30);
            continue;  #endif
         }  
         else  
         {  
            break;  
         }  
     } // wait for the transport layer become ready.     } // wait for the transport layer become ready.
  
     // Is the socket in an unrecoverable error ?     // Is the socket in an unrecoverable error ?


Legend:
Removed from v.1.26.4.1  
changed lines
  Added in v.1.29

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2