(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.81.8.4 and 1.81.8.5

version 1.81.8.4, 2006/06/10 21:54:05 version 1.81.8.5, 2006/06/12 18:26:50
Line 267 
Line 267 
       {       {
           NamedPipeMessage* namedPipeMessage = (NamedPipeMessage*)message;           NamedPipeMessage* namedPipeMessage = (NamedPipeMessage*)message;
  
          // If this is a connection request:  
   
          if (((namedPipeMessage->namedPipe.getPipe()) == ( _rep->namedPipeServer->getPipe())) &&          if (((namedPipeMessage->namedPipe.getPipe()) == ( _rep->namedPipeServer->getPipe())) &&
          (namedPipeMessage->events & NamedPipeMessage::READ))          (namedPipeMessage->events & NamedPipeMessage::READ))
          {          {
Line 388 
Line 386 
  
    if (_localConnection)    if (_localConnection)
    {    {
   #ifndef PEGASUS_DISABLE_LOCAL_DOMAIN_SOCKET
  
 #ifdef PEGASUS_OS_TYPE_WINDOWS #ifdef PEGASUS_OS_TYPE_WINDOWS
        PEGASUS_STD(cout) << "in HTTPAcceptor::_bind before calling _createNamedPipe() " << PEGASUS_STD(endl);         PEGASUS_STD(cout)
              << "in HTTPAcceptor::_bind before calling _createNamedPipe() "
              << PEGASUS_STD(endl);
        // _rep->createNamedPipe();        // _rep->createNamedPipe();
        _createNamedPipe();        _createNamedPipe();
        PEGASUS_STD(cout) << "in HTTPAcceptor::_bind after calling _createNamedPipe() " << PEGASUS_STD(endl);        PEGASUS_STD(cout) << "in HTTPAcceptor::_bind after calling _createNamedPipe() " << PEGASUS_STD(endl);
 // Not sure if we need to continue to bind non local domain sockets in windows.....  
        return;        return;
 // #else  #else
 #endif  
   
 #ifndef PEGASUS_DISABLE_LOCAL_DOMAIN_SOCKET  
   
         reinterpret_cast<struct sockaddr_un*>(_rep->address)->sun_family =         reinterpret_cast<struct sockaddr_un*>(_rep->address)->sun_family =
            AF_UNIX;            AF_UNIX;
        strcpy(reinterpret_cast<struct sockaddr_un*>(_rep->address)->sun_path,         strcpy(
              reinterpret_cast<struct sockaddr_un*>(_rep->address)->sun_path,
               PEGASUS_LOCAL_DOMAIN_SOCKET_PATH);               PEGASUS_LOCAL_DOMAIN_SOCKET_PATH);
   
 #ifdef PEGASUS_PLATFORM_OS400_ISERIES_IBM #ifdef PEGASUS_PLATFORM_OS400_ISERIES_IBM
        AtoE(reinterpret_cast<struct sockaddr_un*>(_rep->address)->sun_path);        AtoE(reinterpret_cast<struct sockaddr_un*>(_rep->address)->sun_path);
 #endif #endif
        ::unlink(reinterpret_cast<struct sockaddr_un*>(_rep->address)->sun_path);        ::unlink(reinterpret_cast<struct sockaddr_un*>(_rep->address)->sun_path);
   #endif
   
 #else #else
        PEGASUS_ASSERT(false);        PEGASUS_ASSERT(false);
 #endif #endif
Line 424 
Line 424 
    }    }
  
    // Create socket:    // Create socket:
   
    if (_localConnection)    if (_localConnection)
    {    {
        _rep->socket = socket(AF_UNIX, SOCK_STREAM, 0);        _rep->socket = socket(AF_UNIX, SOCK_STREAM, 0);
Line 610 
Line 609 
       // Unlink Local Domain Socket Bug# 3312       // Unlink Local Domain Socket Bug# 3312
       if (_localConnection)       if (_localConnection)
       {       {
   #ifndef PEGASUS_OS_TYPE_WINDOWS
 #ifndef PEGASUS_DISABLE_LOCAL_DOMAIN_SOCKET #ifndef PEGASUS_DISABLE_LOCAL_DOMAIN_SOCKET
           PEG_TRACE_STRING(TRC_HTTP, Tracer::LEVEL2,           PEG_TRACE_STRING(TRC_HTTP, Tracer::LEVEL2,
                         "HTTPAcceptor::closeConnectionSocket Unlinking local connection." );                         "HTTPAcceptor::closeConnectionSocket Unlinking local connection." );
Line 618 
Line 618 
 #else #else
          PEGASUS_ASSERT(false);          PEGASUS_ASSERT(false);
 #endif #endif
   #endif
       }       }
  
    }    }
Line 681 
Line 682 
       if (_localConnection)       if (_localConnection)
       {       {
 #ifndef PEGASUS_DISABLE_LOCAL_DOMAIN_SOCKET #ifndef PEGASUS_DISABLE_LOCAL_DOMAIN_SOCKET
   #ifndef PEGASUS_OS_TYPE_WINDOWS
   
          ::unlink(          ::unlink(
              reinterpret_cast<struct sockaddr_un*>(_rep->address)->sun_path);              reinterpret_cast<struct sockaddr_un*>(_rep->address)->sun_path);
   #endif
 #else #else
          PEGASUS_ASSERT(false);          PEGASUS_ASSERT(false);
 #endif #endif
Line 740 
Line 744 
  
    if (_localConnection)    if (_localConnection)
    {    {
   #ifndef PEGASUS_OS_TYPE_WINDOWS
 #ifndef PEGASUS_DISABLE_LOCAL_DOMAIN_SOCKET #ifndef PEGASUS_DISABLE_LOCAL_DOMAIN_SOCKET
        accept_address = reinterpret_cast<struct sockaddr*>(new struct sockaddr_un);        accept_address = reinterpret_cast<struct sockaddr*>(new struct sockaddr_un);
        address_size = sizeof(struct sockaddr_un);        address_size = sizeof(struct sockaddr_un);
 #else #else
        PEGASUS_ASSERT(false);        PEGASUS_ASSERT(false);
 #endif #endif
   #endif
    }    }
    else    else
    {    {
Line 849 
Line 855 
 #ifdef PEGASUS_OS_TYPE_WINDOWS #ifdef PEGASUS_OS_TYPE_WINDOWS
 void HTTPAcceptor::_createNamedPipe() void HTTPAcceptor::_createNamedPipe()
 { {
     PEGASUS_STD(cout) << "in HTTPAcceptor::_createNamedPipe() at the begining" << PEGASUS_STD(endl);      PEGASUS_STD(cout) << "Entering  HTTPAcceptor::_createNamedPipe()." << PEGASUS_STD(endl);
  
     _rep->namedPipeServer = new NamedPipeServer("\\\\.\\pipe\\MyNamedPipe");     _rep->namedPipeServer = new NamedPipeServer("\\\\.\\pipe\\MyNamedPipe");
     PEGASUS_STD(cout) << "in HTTPAcceptor::_createNamedPipe() after calling the pipe server constructor" << PEGASUS_STD(endl);     PEGASUS_STD(cout) << "in HTTPAcceptor::_createNamedPipe() after calling the pipe server constructor" << PEGASUS_STD(endl);
  
  
       cout << "Named pipe...in _createNamedPipe..." << _rep->namedPipeServer->getPipe() << endl;
  
     // Register to receive Messages on Connection pipe:     // Register to receive Messages on Connection pipe:
  
Line 879 
Line 886 
  
    }    }
  
    PEGASUS_STD(cout) << "in HTTPAcceptor::_createNamedPipe() at the end" << PEGASUS_STD(endl);     PEGASUS_STD(cout) << "Leaving  HTTPAcceptor::_createNamedPipe()." << PEGASUS_STD(endl);
    return;    return;
  
 } }


Legend:
Removed from v.1.81.8.4  
changed lines
  Added in v.1.81.8.5

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2