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

Diff for /pegasus/src/Pegasus/Common/HTTPAcceptor.cpp between version 1.72 and 1.77

version 1.72, 2005/08/19 00:24:32 version 1.77, 2005/11/22 20:10:30
Line 39 
Line 39 
 //          Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com) //          Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com)
 //          Sean Keenan, Hewlett-Packard Company (sean.keenan@hp.com) //          Sean Keenan, Hewlett-Packard Company (sean.keenan@hp.com)
 //          Josephine Eskaline Joyce, IBM (jojustin@in.ibm.com) for Bug#2065 //          Josephine Eskaline Joyce, IBM (jojustin@in.ibm.com) for Bug#2065
 //          David Dillard, VERITAS Software Corp.  //          David Dillard, Symantec Corp. (david_dillard@symantec.com)
 //              (david.dillard@veritas.com)  
 //          John Alex, IBM (johnalex@us.ibm.com) for Bug#3312 //          John Alex, IBM (johnalex@us.ibm.com) for Bug#3312
 // //
 //%///////////////////////////////////////////////////////////////////////////// //%/////////////////////////////////////////////////////////////////////////////
Line 83 
Line 82 
 PEGASUS_NAMESPACE_BEGIN PEGASUS_NAMESPACE_BEGIN
  
  
 //  
 // Determine the correct type to use for the length passed to getsockname().  
 // The default is to use the 'socklen_t'.  
 //  
   
 #if defined(PEGASUS_OS_TYPE_WINDOWS) || defined(PEGASUS_OS_OS400)  
 #define PEGASUS_SOCKLEN_T   int  
 #endif  
   
 #if defined(PEGASUS_OS_HPUX) && !defined(_XOPEN_SOURCE_EXTENDED)  
 #define PEGASUS_SOCKLEN_T   int  
 #endif  
   
   
 #if defined(PEGASUS_OS_VMS) || defined(PEGASUS_OS_ZOS)  
 #define PEGASUS_SOCKLEN_T   unsigned  
 #endif  
   
 #ifndef PEGASUS_SOCKLEN_T  
 #define PEGASUS_SOCKLEN_T   socklen_t  
 #endif  
   
 static int MAX_CONNECTION_QUEUE_LENGTH = -1; static int MAX_CONNECTION_QUEUE_LENGTH = -1;
  
   
 //////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
 // //
 // HTTPAcceptorRep // HTTPAcceptorRep
Line 140 
Line 116 
     }     }
     struct sockaddr* address;     struct sockaddr* address;
  
 #if defined(PEGASUS_PLATFORM_ZOS_ZSERIES_IBM) || defined(PEGASUS_OS_VMS)      PEGASUS_SOCKLEN_T address_size;
    size_t address_size;  
 #elif defined(PEGASUS_PLATFORM_AIX_RS_IBMCXX) || defined(PEGASUS_PLATFORM_LINUX_GENERIC_GNU) || (defined(PEGASUS_PLATFORM_SOLARIS_SPARC_CC) && !defined(SUNOS_5_6))  
    socklen_t address_size;  
 #else  
    int address_size;  
 #endif  
       Mutex _connection_mut;       Mutex _connection_mut;
  
       Sint32 socket;      PEGASUS_SOCKET socket;
       Array<HTTPConnection*> connections;       Array<HTTPConnection*> connections;
 }; };
  
Line 262 
Line 232 
      for (Uint32 i = 0, n = _rep->connections.size(); i < n; i++)      for (Uint32 i = 0, n = _rep->connections.size(); i < n; i++)
      {      {
         HTTPConnection* connection = _rep->connections[i];         HTTPConnection* connection = _rep->connections[i];
         Sint32 socket = connection->getSocket();          PEGASUS_SOCKET socket = connection->getSocket();
  
         if (socket == closeConnectionMessage->socket)         if (socket == closeConnectionMessage->socket)
         {         {
Line 643 
Line 613 
      for (Uint32 i = 0, n = _rep->connections.size(); i < n; i++)      for (Uint32 i = 0, n = _rep->connections.size(); i < n; i++)
      {      {
         HTTPConnection* connection = _rep->connections[i];         HTTPConnection* connection = _rep->connections[i];
         Sint32 socket = connection->getSocket();          PEGASUS_SOCKET socket = connection->getSocket();
  
         // Unsolicit SocketMessages:         // Unsolicit SocketMessages:
  
Line 651 
Line 621 
  
         // Destroy the connection (causing it to close):         // Destroy the connection (causing it to close):
  
         while (connection->refcount.value()) { }          while (connection->refcount.get()) { }
         delete connection;         delete connection;
      }      }
  
Line 671 
Line 641 
    // Accept the connection (populate the address):    // Accept the connection (populate the address):
  
    struct sockaddr* accept_address;    struct sockaddr* accept_address;
 #if defined(PEGASUS_PLATFORM_ZOS_ZSERIES_IBM) || defined(PEGASUS_OS_VMS)     PEGASUS_SOCKLEN_T address_size;
    size_t address_size;  
 #elif defined(PEGASUS_PLATFORM_AIX_RS_IBMCXX) || defined(PEGASUS_PLATFORM_LINUX_GENERIC_GNU) || (defined(PEGASUS_OS_SOLARIS) && !defined(SUNOS_5_6))  
    socklen_t address_size;  
 #else  
    int address_size;  
 #endif  
  
    if (_localConnection)    if (_localConnection)
    {    {
Line 694 
Line 658 
        address_size = sizeof(struct sockaddr_in);        address_size = sizeof(struct sockaddr_in);
    }    }
  
    Sint32 socket = accept(_rep->socket, accept_address, &address_size);     PEGASUS_SOCKET socket = accept(_rep->socket, accept_address, &address_size);
  
    delete accept_address;    delete accept_address;
  
Line 730 
Line 694 
 #endif #endif
  
  
    Logger::put(Logger::STANDARD_LOG, System::CIMSERVER, Logger::TRACE,     PEG_LOGGER_TRACE((Logger::STANDARD_LOG, System::CIMSERVER, 0,
            "HTTPAcceptor - accept() success.  Socket: $1"         "HTTPAcceptor - accept() success.  Socket: $1" ,socket));
            ,socket);  
  
    AutoPtr<MP_Socket> mp_socket(new MP_Socket(    AutoPtr<MP_Socket> mp_socket(new MP_Socket(
        socket, _sslcontext, _sslContextObjectLock, _exportConnection));        socket, _sslcontext, _sslContextObjectLock, _exportConnection));


Legend:
Removed from v.1.72  
changed lines
  Added in v.1.77

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2